Googology Wiki
Googology Wiki

204 byte code computing primitive sequence system

Primitive sequence number is the large number made by a Japanese Googology Wiki user Bashicu[1]. It was posted to the large number thread Part.10[2] of website 2channel as the program (message No.109) and its examples (No.135-140)[3][4]. The algorithm making primitive sequence number is called as Primitive sequence system, it is like Beklemishev's worm and it has the strength of \(f_{\varepsilon_0}(n)\). The size of primitive sequence number is about \(f_{\varepsilon_0+1}(10)\).

Pair sequence system, which is the expansion of primitive sequence system into two rows by Bashicu, has the strength approximated to \(f_{\psi(\Omega_{\omega})}(n)\) with respect to Buchholz's function. The expansion into three rows by Bashicu is called as Trio sequence system. The generalization of them by Bashicu are called as Bashicu matrix system. It has \(n\) rows. Their investigation is currently in progress.

Hyper primitive sequence system, which is an extension of primitive sequence system using difference sequence system by a Japanese Googology Wiki user Yukito has the strength of \(f_{\psi(\Omega_{\omega})}(n)\) with respect to Buchholz's function.


The first definition of the primitive sequence number was posted into the communication website 2channel large number thread Part.10[5] as the pseudo code in BASIC language. After that, the definitions are maintained on the article Summary of the large number in BASIC Language in Wikia user blog.

Mathematical definition

Although the original definition is written in the pseudo code of BASIC language, It can be described in the mathematical definition as following:

Primitive sequence is a list of non negative integer \(S = (S_0, S_1, \ldots, S_k)\). Primitive sequence has the behavior as the function from a non negative integer \(n\) into a non negative integer, the value of \(S[n]\) is defined as below:

  • \( ()[n]=n \).
  • good part \(g\) and bad part \(b\) of the primitive sequence are defined as following: (\(r\) is the largest non negative integer which gives \(r<k\) and \(S_r<S_k\) in below.)
    • When \(r\) exists, let \(g\) and \(b\) be \(g=(S_0,\ldots,S_{r-1}),~b= (S_{r},\ldots,S_{k-1})\).
    • When \(r\) does not exists, let them be \(g=(S_0, \ldots, S_{k−1}),~b=() \).
  • Let \(S[n]\) be \(S[n] = (g \frown b \underbrace{\frown b \frown \cdots \frown b}_{f(n) \mathrm{'s}~\frown b})[f(n)]\). Where, \(f(n)\) is \(f(n)=n^2\).

That's the definition of \(S[n]\).

\(\frown\) is the concatenation of the sequence, for example, \((0, 3, 2) \frown (1, 4, 5) = (0, 3, 2, 1, 4, 5)\). \(P^{10}(9)~(P(n)=(0,\cdots,n)[n])\) is defined as Primitive sequence number with the primitive sequence system above.

That is the definition modeled after Beklemishev's worm. Note that the position which make division of \(g\) and \(b\) is different from the one of Beklemishev's worm.

Explanation of definition

The easy explanation of finding \(r\) is, searching the number \(S_k-1\) from the right side of the sequence, the index of the one is found as \(r\). For example, in the case of \((0, 1, 2, 3, 3, 1, 2, 3, 2, 3, 2, \underbrace{2}_{=S_k})[2]\) , the rightmost number \(S_k\) is \(2\), search \(1\) to the left side from there, the first found \(1\) is \(S_5=1\) so that \(r=5\). In this case \(b\) and \(g\) become \((\underbrace{0, 1, 2, 3, 3}_{=g}, \underbrace{1, 2, 3, 2, 3, 2}_{=b}, 2)[2]\). The bracket is \([2]\) and \(f(n)=n^2\), they give

\begin{eqnarray*} S[2]&=&g\frown b~\underbrace{\frown b\frown b\frown b\frown b}_{2^2~{\rm ’s}}\\ &=&(\underbrace{0, 1, 2, 3, 3}_{=g}, \underbrace{1, 2, 3, 2, 3, 2}_{=b}, \underbrace{1, 2, 3, 2, 3, 2}_{=b}, \underbrace{1, 2, 3, 2, 3, 2}_{=b}, \underbrace{1, 2, 3, 2, 3, 2}_{=b}, \underbrace{1, 2, 3, 2, 3, 2}_{=b})[4]. \end{eqnarray*}

This \(S_r\) is often called as bad root.


Primitive sequence is often written in the format like \(S = (S_0 S_1 \ldots S_k) = (S_0)(S_1) \ldots (S_k)\) as the special case of the Bashicu matrix system.

The calculation of the Primitive sequence system can be done with Bashicu Matrix Calculator. For example, the calculation result of (0)(1)(2)(3)[2] becomes like this. (It grows if you give the bigger 'maximum length'.) Although it might look to be continue to grow, this sequence always achieve to the empty sequence at the last and it leave \([n]\). Then the calculation is terminated after the output of \([n]=n\). If you give (0)(1)(2)[2] with \(f(n)=n\), you can see the process until the termination.

In addition that, it can be modified to match to Hardy hierarchy and it can calculate \(H_{\omega^\omega}(2) = 8\) as like this.

Considering the function \(P(n) = (0,1,2, \ldots, n)[n]\), The grow rate of the \(P(n)\) is about \(f_{\varepsilon_0}(n)\). Primitive sequence number is \(P^{10}(9)\) and its size is about \(f_{\varepsilon_0+1}(10)\).

Correspondence with ordinals

Each primitive sequence corresponds to an ordinal less than \(\epsilon_0\). The corresponding ordinals are always reduced in the calculation of primitive sequences. Since there is no infinite descending chain of ordinals, the calculation of the primitive sequences necessarily reach end.

There is a program which displays the ordinals corresponding to primitive sequences.[6] The inverse correspondence from ordinals to primitive sequences of standard form is demonstrated in the following way:


  1. Write the hydra tree corresponding to a given ordinal \(\alpha\). The figure above represents \(\omega^{\omega^\omega+\omega^3}+\omega^{\omega^2+1}\) as the paper by Kirby and Paris (1982).[7]
  2. Start below from root node.
  3. Add a new element 0 into the last of the sequence when you go up in 1 above from the root node.
  4. Add a new element "(the last element) + 1" into the last of the sequence when you go up in 1 above from the other node.
  5. When you reach the end of the branch and go down to the branching node (common anscestor) and go on the another branch, add "(the branching element) + 1".
  6. so that the number in the node becomes the value "(height)-1".
  7. Here is the example to corresponding with the figure like this. The part of \(\omega^{\omega^\omega}\) is shown as (0,1,2,3). after that, go down 3 nodes, go to the next branch (segment), get (1,2,2,2), it is added into the sequence. After that, (0,1,2,2,1) is added as the same. Finally, the hydra tree is corresponded withthe primitive sequence (0,1,2,3,1,2,2,2,0,1,2,2,1).
  8. \(\omega^{\omega^\omega+\omega^3}+\omega^{\omega^2+1} = (0,1,2,3,1,2,2,2,0,1,2,2,1)\).


Here are examples of the correspondence between ordinals below \(\varepsilon_0\) and primitive sequences of standard form.

\begin{eqnarray*} 1 &=& (0) \\ 2 &=& (0,0) \\ 3 &=& (0,0,0) \\ \omega &=& (0,1) \\ \omega+1 &=& (0,1,0) \\ \omega \cdot 2 &=& (0,1,0,1) \\ \omega^2 &=& (0,1,1) \\ \omega^2+\omega &=& (0,1,1,0,1) \\ \omega^3 &=& (0,1,1,1) \\ \omega^\omega &=& (0,1,2) \\ \omega^{\omega^\omega} &=& (0,1,2,3) \\ \omega^{\omega^{\omega^\omega}} &=& (0,1,2,3,4) \\ \omega^{\omega^{(\omega^\omega+1)}} &=& (0,1,2,3,4,2) \\ \omega^{\omega^{\omega^{\omega^\omega}}} &=& (0,1,2,3,4,5) \\ \end{eqnarray*}


The shortest codes

The python code which performs Primitive sequence system is shown in the site The Py_1 Function, which is the online JAM to make the large number with short codes.

The code is 72 bytes and it calculates (0)(1)(2)(3)(4)(5)(6)(7)(8)(9)[9] in \(f(n)=n^2\).

1 x,*m=range(9,-1,-1)
2 while m:
3    q,*m=m;x*=x
4    if q:m=m[:m.index(q-1)+1]*x+m

Here are a few codes:


  1. User:BashicuHyudora
  2. Although 2channel is banned in China and it bans the access from United States, the archive can be seen here.
  3. the article explaining it
  4. Googology in Japan - exploring large numbers
  5. its archive
  6. by Fish and by koteitan
  7. Kirby, L.; Paris, J. (1982), "Accessible independence results for Peano arithmetic"

See also

By Aeton: Okojo numbers · N-growing hierarchy
By 新井 (Arai): Arai's \(\psi\)
By バシク (BashicuHyudora): Primitive sequence number · Pair sequence number · Bashicu matrix system 1/2/3/4
By ふぃっしゅ (Fish): Fish numbers (Fish number 1 · Fish number 2 · Fish number 3 · Fish number 4 · Fish number 5 · Fish number 6 · Fish number 7 · S map · SS map · s(n) map · m(n) map · m(m,n) map) · Bashicu matrix system 1/2/3/4 computation programmes · TR function (I0 function)
By じぇいそん (Jason): Irrational arrow notation · δOCF · δφ · ε function
By 甘露東風 (Kanrokoti): KumaKuma ψ function
By 小林銅蟲 (Kobayashi Doom): Sushi Kokuu Hen
By koteitan: Bashicu matrix system 2.3
By mrna: 段階配列表記 · 降下段階配列表記 · 多変数段階配列表記 · SSAN · S-σ
By Naruyoko Naruyo: Y sequence computation programme · ω-Y sequence computation programme
By Nayuta Ito: N primitive · Flan numbers · Large Number Lying on the Boundary of the Rule of Touhou Large Number 4
By p進大好きbot: Large Number Garden Number
By たろう (Taro): Taro's multivariable Ackermann function
By ゆきと (Yukito): Hyper primitive sequence system · Y sequence · YY sequence · Y function · ω-Y sequence
See also: Template:Googology in Asia