%I
%S 2,3,5,7,23,63,383,2047
%N Value for which b(a(n))=0 when b(2)=n and b(k+1) is calculated by writing b(k) in base k, reading this as being written in base k+1 and then subtracting 1.
%C a(8)=3*2^(3*2^27+27)1 which is more than 10^(10^8) and equal to the final base of the Goodstein sequence starting with g(2)=4; indeed, apart from the initial term, the sequence starting with b(2)=8 is identical to the Goodstein sequence starting with g(2)=4. The initial terms of a(n) [2, 3, 5 and 7] are equal to the initial terms of the equivalent final bases of Goodstein sequences starting at the same points. a(9)=2^(2^(2^70+70)+2^70+70)1 which is more than 10^(10^(10^20)).
%C It appears that if n is even then a(n) is one less than three times a power of two, while if n is odd then a(n) is one less than a power of two.
%C Comment from _John Tromp_, Dec 02 2004: The sequence 2,3,5,7,3*2^402653211  1, ... gives the final base of the Goodstein sequence starting with n. This is an example of a very rapidly growing function that is total (i.e. defined on any input), although this fact is not provable in firstorder Peano Arithmetic. See the links for definitions. This grows even faster than the Friedman sequence described in the Comments to A014221.
%C In fact there are two related sequences: (i) The Goodstein function l(n) = number of steps for the Goodstein sequence to reach 0 when started with initial term n >= 0: 0, 1, 3, 5, 3*2^402653211  3, ...; and (ii) the same sequence + 2: 2, 3, 5, 7, 3*2^402653211  1, ..., which is the final base reached. Both grow too rapidly to have their own entries in the database.
%C Related to the hereditary base sequences  see crossreference lines.
%C This sequence gives the final base of the weak Goodstein sequence starting with n; compare A266203, the length of the weak Goodstein sequence. a(n) = A266203(n) + 2.
%H R. L. Goodstein, <a href="http://www.jstor.org/stable/2268019">On the Restricted Ordinal Theorem</a>, J. Symb. Logic 9, 3341, 1944.
%H L. Kirby, and J. Paris, <a href="https://doi.org/10.1112/blms/14.4.285">Accessible independence results for Peano arithmetic</a>, Bull. London Mathematical Society, 14 (1982), 285293.
%H J. Tromp, <a href="https://tromp.github.io/pearls.html">Programming Pearls</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GoodsteinSequence.html">Goodstein Sequence</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Goodstein's_theorem">Goodstein's theorem</a>
%e a(3)=7 because starting with b(2)=3=11 base 2, we get b(3)=111 base 3=10 base 3=3, b(4)=101 base 4=3, b(5)=31 base 5=2, b(6)=21 base 6=1 and b(7)=11 base 7=0.
%o Concerning the sequence 2,3,5,7,3*2^402653211  1, ... mentioned above, John Tromp write: In Haskell, the sequence is the infinite list
%o main=mapM_(print.g 2)[0..] where
%o g b 0=b;g b n=g c(s 0 n1)where s _ 0=0;s e n=mod n b*c^s 0 e+s(e+1)(div n b);c=b+1
%o In Ruby, f(n) is defined by
%o def s(b,e,n)n==0?0:n%b*(b+1)**s(b,0,e)+s(b,e+1,n/b)end
%o def g(b,n)n==0?b:g(b+1,s(b,0,n)1)end
%o def f(n)g(2,n)end
%Y Cf. A266202, A268687, A268689, A268688.
%Y Equals A266203 + 2.
%Y Weak Goodstein sequences: A267647, A267648, A271987, A271988, A271989, A271990, A271991, A137411, A271992, A265034.
%Y Steps of strong Goodstein sequences: A056004, A057650, A059934, A059935, A059936, A271977.
%Y Strong Goodstein sequences: A215409, A056193, A266204, A222117, A059933.
%Y Woodall numbers: A003261.
%K base,nonn
%O 0,1
%A _Henry Bottomley_, Aug 04 2000
