cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A082502 Erroneous version of A052200.

Original entry on oeis.org

1, 64, 20736, 1677216, 25600000000, 63403380965376
Offset: 0

Views

Author

Keywords

A028444 Busy Beaver sequence, or Rado's sigma function: maximal number of 1's that an n-state Turing machine can print on an initially blank tape before halting.

Original entry on oeis.org

0, 1, 4, 6, 13, 4098
Offset: 0

Views

Author

Scott Aaronson (sja8(AT)cornell.edu)

Keywords

Comments

Expanded definition from Daniel Forgues: Busy Beaver sequence, or Rado's Sigma function: maximum number of 1s that an n-state, 2-symbol, d+ in {LEFT, RIGHT}, 5-tuple (q, s, q+, s+, d+) halting Turing machine can print on an initially blank tape (all 0's) before halting.
States q and q+ in set Q_n of n distinct states (plus the Halt state), tape symbols s and s+ in set S = {0, 1}, shift direction d+ in {LEFT, RIGHT} (NONE is excluded here), + suffix meaning next and q+ = f(q, s), s+ = g(q, s), d+ = h(q, s).
The function Sigma(n) = Sigma(n, 2) (A028444) denotes the maximal number of tape marks (1's) which a halting Turing Machine H with n internal states, 2 symbols, and a two-way infinite tape can produce onto an initially blank tape (all 0's) and then halt. The function S(n) = S(n, 2) (A060843) denotes the maximal number of steps (thus shifts, since direction NONE is excluded) which a halting machine H can take (not necessarily the same Turing machine producing a maximum number of 1's and need not even produce many tape marks). For all n, S(n) >= Sigma(n).
Given that 5-state 2-symbol halting Turing machines can compute Collatz-like congruential functions (see references under A060843), it may be very hard to find the next term.
Rado's Sigma function grows faster than any computable function and is thus noncomputable.
From Daniel Forgues, Jun 05-06 2011: (Start)
H in H_(n, k) is a halting* Turing machine with n states and k symbols;
* (on a blank tape (all 0's) as input)
States q, q+ in set Q_n of n distinct states (plus the Halt state);
Symbols s, s+ in set S_k of k distinct symbols (0 as the blank symbol);
Shift direction d+ in {LEFT, RIGHT} (NONE is excluded here);
sigma(H) is the number of non-blank symbols left on the tape by H;
s(H) is the number of steps (or shifts in our case) taken by H;
Sigma(n, k) = max {sigma(H) : H is a halting Turing machine with n states and k symbols}
S(n, k) = max {s(H) : H is a halting Turing machine with n states and k symbols}
a(n) is Sigma(n) = Sigma(n, 2) since a 2-symbol BB-class Turing machine is assumed.
For all n, S(n, k) >= Sigma(n, k), k >= 2. (End)
From Jianing Song, Nov 12 2023: (Start)
We have a(2*n) > H_n(3,3) = 3 "up-arrow"(n-2) 3, where H_n is the n-th hyperoperator, and "up-arrow" is Knuth up-arrow notation (see the Wikipedia link). This means that a(12) > 3^^^^3 = g(1), where g(1) is the starting value in the sequence that defines Graham's number = g(64).
Note that there is an (n_0)-state binary Turing machine (and hence an n-state one for every n >= n_0) which halts if and only if ZFC is inconsistent, so a(n_0) (and hence a(n) for every n >= n_0) is independent of ZFC, which means that a(n_0) evaluates differently in different models of ZFC; see the section "Non-computability" of the Wikipedia link and the Math Stack Exchange. The minimum such n_0 is not exceeding 745. (End)
a(6) >= 2^^(2^^(2^^10)). - Brian Galebach, Jul 10 2025

References

  • John Hopcroft, Turing Machines, Sci. Amer. vol. 250, #5, 86-98, May 1984, table on page 92 gives old lower bounds.
  • Jeffrey Shallit, A second course in formal languages and automata theory, Cambridge University Press, 2008. See Fig. 6.2, p. 185.

Crossrefs

Extensions

Edited by Daniel Forgues, Mar 25 2010, Jun 05 2011
Edited by N. J. A. Sloane, Aug 30 2011
a(5) added by Brian Galebach, Jun 10 2025

A107668 Column 0 of triangle A107667.

Original entry on oeis.org

1, 4, 45, 816, 20225, 632700, 23836540, 1048592640, 52696514169, 2976295383100, 186548057815801, 12845016620629488, 963644465255618276, 78224633235142116240, 6830914919397129328500, 638477522900795994967040, 63599377775480137499907561, 6725771848938288950491594140
Offset: 0

Views

Author

Paul D. Hanna, Jun 07 2005

Keywords

Comments

Shift right of column 1 of triangle A107670, which is the matrix square of triangle A107667.
The o.g.f. A(x) = Sum_{m >= 0} a(m)*x^m is such that, for each integer n > 0, the coefficient of x^n in the expansion of exp(n^2*x)*(1 - x*A(x)) is equal to 0.
Given the o.g.f. A(x), the o.g.f. of A304322 equals 1/(1 - x*A(x)).
Also, a(n) is the number of 2-symbol Turing Machine state graphs in which n states are reached in canonical order. A canonical TM state graph lists for each state 1..n, and each of 2 symbols 0,1 in lexicographic order, a next state that is either the halt state, an already listed state, or the least unlisted state, as in the Haskell program below. Multiplied by 4^(2*n), this gives a much smaller number of TMs to be considered for the Busy Beaver function than given by A052200. - John Tromp, Oct 15 2024

Examples

			O.g.f.: A(x) = 1 + 4*x + 45*x^2 + 816*x^3 + 20225*x^4 + 632700*x^5 + 23836540*x^6 + 1048592640*x^7 + 52696514169*x^8 + 2976295383100*x^9 + ...
From _Petros Hadjicostas_, Mar 10 2021: (Start)
We illustrate the above formula for a(n) with the compositions of n + 1 for n = 2.
The compositions of n + 1 = 3 are 3, 1 + 2, 2 + 1, and 1 + 1 + 1.  Thus the above sum has four terms with (r = 1, s_1 = 3), (r = 2, s_1 = 1, s_2 = 2), (r = 2, s_1 = 2, s_2 = 1), and (r = 3, s_1 = s_2 = s_3 = 1).
The value of the denominator Product_{j=1..r} s_j! for these four terms is 6, 2, 2, and 1, respectively.
The value of the numerator Product_{j=1..r} (Sum_{i=1..j} s_i)^(2*s_j) for these four terms is 729, 81, 144, and 36.
Thus a(2) = 729/6 - 81/2 - 144/2 + 36/1 = 45. (End)
		

Crossrefs

Programs

  • Haskell
    -- using program for A107667
    a107668 = map head a where a = [[sum [a!!n!!i * a!!i!!(k+1) | i<-[k+1..n]] | k <- [0..n-1]] ++ [fromIntegral n+1] | n <- [0..]] -- John Tromp, Oct 21 2024
    
  • Haskell
    -- low memory version
    a107668 n = (foldl' (\r i->sum r`seq`listArray(0,n)(0:[if i+1<2*j then 0 else r!j*(n+2-j)+r!(j-1)|j<-[1..n]])) (listArray(0,n)(0:repeat 1)) [1..2*n])!n -- John Tromp, Oct 15 2024
  • PARI
    {a(n)=local(A);if(n==0,n+1,A=(n+1)*x+x*O(x^n); for(k=0,n,A+=polcoeff(A,k)*x^k*(n+1-prod(i=0,k,1+(i-n-1)*x))); polcoeff(A,n))}
    for(n=0,30, print1(a(n),", "))
    
  • PARI
    /* From formula: [x^n] exp( n^2*x ) * (1 - x*A(x)) = 0 */
    {a(n) = my(A=[1]); for(i=0, n, A=concat(A, 0); m=#A; A[m] = Vec( exp(x*m^2 +x^2*O(x^m)) * (1 - x*Ser(A)) )[m+1] ); A[n+1]}
    for(n=0,25, print1( a(n),", ")) \\ Paul D. Hanna, May 12 2018
    
  • PARI
    /* From Recurrence: */
    {a(n) = if(n==0,1, (n+1)^(2*n+2)/(n+1)! - sum(k=1,n, (n+1)^(2*k)/k! * a(n-k) ))}
    for(n=0,25, print1( a(n),", ")) \\ Paul D. Hanna, May 12 2018
    

Formula

O.g.f. A(x) satisfies: [x^n] exp( n^2*x ) * (1 - x*A(x)) = 0 for n > 0. - Paul D. Hanna, May 12 2018
a(n) = (n+1)^2 * A107669(n).
a(n) = (n+1)^(2*n+2)/(n+1)! - Sum_{k=1..n} (n+1)^(2*k)/k! * a(n-k) for n > 0 with a(0) = 1. - Paul D. Hanna, May 12 2018
a(n) = A342202(2,n+1) = Sum_{r=1..(n+1)} (-1)^(r-1) * Sum_{s_1, ..., s_r} (1/(Product_{j=1..r} s_j!)) * Product_{j=1..r} (Sum_{i=1..j} s_i)^(2*s_j)), where the second sum is over lists (s_1, ..., s_r) of positive integers s_i such that Sum_{i=1..r} s_i = n+1. (Thus the second sum is over all ordered partitions (i.e., compositions) of n+1. See Michel Marcus's PARI program in A342202.) - Petros Hadjicostas, Mar 10 2021
a(n) ~ sqrt(1-c) * 2^(2*n + 3/2) * n^(n + 1/2) / (sqrt(Pi) * exp(n) * c^(n+1) * (2-c)^(n+1)), where c = -A226775 = -LambertW(-2*exp(-2)). - Vaclav Kotesovec, Oct 18 2024

A004147 Number of n-state Turing machines which halt.

Original entry on oeis.org

32, 9784, 7571840, 11140566368
Offset: 1

Views

Author

Keywords

Comments

This sequence is noncomputable, because it could be used to solve the halting problem. In fact, it is of the same degree of difficulty as the halting problem. - David Diamondstone (skeptical.scientist(AT)gmail.com), Dec 28 2007

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

More terms from David Diamondstone (skeptical.scientist(AT)gmail.com), Dec 28 2007
a(4) from Jonathan Lee, who enumerated all 25.6 billion 4-state machines up to 107 steps, Mar 05 2016

A125269 Minimal number of states required for a 2-symbol, 5-tuple Turing machine that takes n steps on an initially blank tape before halting.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Dustin Wehr (robert.wehr(AT)mail.mcgill.ca), Jan 16 2007, Jan 28 2007

Keywords

Comments

If BB(n) = A060843(n), then a(BB(n)) = n and that is the last occurrence of n in this sequence. a(n) will not become monotonic; if it did, we could compute BB(n), since a(n) is computable. a(n) diverges properly, but does so very slowly. The terms with values 1,2,3 were computed by exhaustive search. The terms with value 4 were inferred from knowing that they are greater than 3 and from the observation that for all n, a(n+1) <= a(n) + 1 (an easy construction). Using exhaustive search, may be able to extend the sequence to (most of) the terms up to and a bit beyond a(107) = 4, but going much further would likely require a more sophisticated method (see A052200).
If BB(n) = A060843(n), then a(BB(n)) = n and that is the last occurrence of n in this sequence. a(n) will not become monotonic; if it did, we could compute BB(n), since a(n) is computable. a(n) diverges properly, but does so very slowly. a(n+1) <= a(n) + 1 (an easy construction). - Martin Fuller, Feb 14 2007

Crossrefs

Extensions

More terms from Martin Fuller, Feb 14 2007

A118874 A halting sequence: let f_n be the n-th recursive function, relative to the Godel numbering given in Cutland, then a(n) is f_n(n)+1 if the corresponding program halts on input n, 0 otherwise.

Original entry on oeis.org

1, 3, 1, 4, 2, 1, 1, 0, 1, 12, 2, 1, 1, 1, 1, 16, 0, 19, 1, 21, 3, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 32, 1, 0, 0, 36, 2, 1, 1, 0, 2, 45, 3, 2, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 64, 1, 67, 1, 0, 0, 0, 0, 0, 1, 76, 2, 1, 1, 1, 1, 81, 0, 84, 2, 86, 4, 3, 3, 0, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0
Offset: 0

Views

Author

Sam Alexander, May 24 2006

Keywords

Comments

The prototypical example of a noncomputable sequence.

Examples

			Using Cutland's Godel numbering, 80 corresponds to the URM program "Z(1) J(1,1,1) S(1)", which clearly loops forever on any input, so a(80)=0. On the other hand, 17 corresponds to the URM program "S(1) T(1,1)", which, on input 17, produces 18. So a(17)=18+1=19.
		

References

  • Nigel Cutland, "Computability: An introduction to recursive function theory". Cambridge University Press, 1980. p. 78.

Crossrefs

A337025 Number of n-state 2-symbol halt-free Turing machines.

Original entry on oeis.org

1, 16, 4096, 2985984, 4294967296, 10240000000000, 36520347436056576, 182059119829942534144, 1208925819614629174706176, 10314424798490535546171949056, 109951162777600000000000000000000, 1432052311740255546466984939315265536
Offset: 0

Views

Author

Nicholas Drozd, Aug 11 2020

Keywords

Comments

A Turing machine is halt-free if none of its instructions lead to the halt state.
This sequence is strictly less than A052200(n) for all n > 0, since halt-free n-state machines are a strict subset of all n-state machines.
Solutions to the so-called "Beeping Busy Beaver" problem will almost certainly be halt-free programs.
For n > 1, a(n) is the absolute value of the determinant of a Hadamard matrix of size 4(n-1). This is apparent from the fact that HH^T = nI_n implies det(H)^2 = det(nI_n) = n^n, so det(H) = +- n^(n/2) and plugging in 4n yields a(n). - Nour Abouyoussef, Jun 25 2025

Crossrefs

Cf. A052200.

Programs

  • Python
    [((4 * n) ** 2) ** n for n in range(12)]

Formula

a(n) = ((4*n)^2)^n.
Showing 1-7 of 7 results.