%I #47 Apr 24 2024 11:12:56
%S 16,7625597484986,50973998591214355139406377,
%T 53793641718868912174424175024032593379100060,
%U 19916489515870532960258562190639398471599239042185934648024761145811,5103708485122940631839901111036829791435007685667303872450435153015345686896530517814322070729709
%N Goodstein sequence starting with 16: to calculate a(n+1), write a(n) in the hereditary representation in base n+2, then bump the base to n+3, then subtract 1.
%C See A266201 for definitions of and key links for hereditary representation and Goodstein sequences.
%C Goodstein's theorem shows that the Goodstein sequence G_n(k) eventually stabilizes and then decreases by 1 at each step until it reaches 0. Thereafter the values of G_n(k) < 0 are not part of the sequence. By Goodstein's theorem we conclude that G_n(k) is a finite sequence.
%C In this case when a(0) = G_0(16) = 16, there seems little possibility of describing how incredibly large n must be for a(n) to reach 0.
%H Reinhard Zumkeller, <a href="/A059933/b059933.txt">Table of n, a(n) for n = 0..18</a>
%H R. L. Goodstein, <a href="http://www.jstor.org/stable/2268019">On the Restricted Ordinal Theorem</a>, J. Symb. Logic 9, 33-41, 1944.
%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>
%H Reinhard Zumkeller, <a href="/A211378/a211378.hs.txt">Haskell programs for Goodstein sequences</a>
%F a(n) = G_n(16), where G is the function defined in A266201.
%e a(0) = 16 = 2^(2^2) so a(1) = 3^(3^3)-1 = 7625597484986.
%e So a(1) = 2*3^(2*3^2 + 2*3 + 2) + 2*3^(2*3^2 + 2*3 + 1) + 2*3^(2*3^2 + 2*3) + 2*3^(2*3^2 + 1*3 + 2) + 2*3^(2*3^2 + 1*3 + 1) + 2*3^(2*3^2 + 1*3) + 2*3^(2*3^2 + 2) + 2*3^(2*3^2 + 1) + 2*3^(2*3^2) + 2*3^(3^2 + 2*3 + 2) + 2*3^(3^2 + 2*3 + 1) + 2*3^(3^2 + 2*3) + 2*3^(3^2 + 1*3 + 2) + 2*3^(3^2 + 1*3 + 1) + 2*3^(3^2 + 1*3) + 2*3^(3^2 + 2) + 2*3^(3^2 + 1) + 2*3^(3^2) + 2*3^(2*3 + 2) + 2*3^(2*3 + 1) + 2*3^(2*3) + 2*3^(1*3 + 2) + 2*3^(1*3 + 1) + 2*3^(1*3) + 2*3^(2) + 2*3^(1) + 2,
%e leading to a(2) = 2*4^(2*4^2 + 2*4 + 2) + 2*4^(2*4^2 + 2*4 + 1) + 2*4^(2*4^2 + 2*4) + 2*4^(2*4^2 + 1*4 + 2) + 2*4^(2*4^2 + 1*4 + 1) + 2*4^(2*4^2 + 1*4) + 2*4^(2*4^2 + 2) + 2*4^(2*4^2 + 1) + 2*4^(2*4^2) + 2*4^(4^2 + 2*4 + 2) + 2*4^(4^2 + 2*4 + 1) + 2*4^(4^2 + 2*4) + 2*4^(4^2 + 1*4 + 2) + 2*4^(4^2 + 1*4 + 1) + 2*4^(4^2 + 1*4) + 2*4^(4^2 + 2) + 2*4^(4^2 + 1) + 2*4^(4^2) + 2*4^(2*4 + 2) + 2*4^(2*4 + 1) + 2*4^(2*4) + 2*4^(1*4 + 2) + 2*4^(1*4 + 1) + 2*4^(1*4) + 2*4^(2) + 2*4^(1) + 1 = 2*(4^32 + 4^16 + 1)*(4^8 + 4^4 + 1)*(4^2 + 4*1)-1 = 50973998591214355139406377.
%o (Haskell) -- See Link
%o (PARI) bump(a, n) = {if (a < n, return (a)); my(pd = Pol(digits(a, n))); my(de = vector(poldegree(pd)+1, k, k--; polcoeff(pd, k))); my(bde = vector(#de, k, k--; bump(k, n))); my(q = sum(k=0, poldegree(pd), if (c=polcoeff(pd, k), c*x^bde[k+1], 0))); return(subst(q, x, n+1)); }
%o lista(nn) = {print1(a = 16, ", "); for (n=2, nn, a = bump(a, n)-1; print1(a, ", "); ); } \\ _Michel Marcus_, Feb 28 2016
%o (PARI) (B(n,b)=sum(i=1,#n=digits(n,b),n[i]*(b+1)^if(#n<b+i,#n-i,B(#n-i,b)))); vector(7,n,a=if(n>1,B(a,n)-1,16)) \\ _M. F. Hasler_, Feb 12 2017
%Y Cf. A266201: G_n(n).
%Y Cf. A056193: G_n(4), A056004: G_1(n), A057650 G_2(n), A056041.
%Y Cf. A215409: G_n(3), A222117: G_n(15), A211378: G_n(19), A266204: G_n(5), A266205: G_n(6).
%K nonn,hard,fini
%O 0,1
%A _Henry Bottomley_, Feb 12 2001
%E Definition corrected by _N. J. A. Sloane_, Mar 06 2006
%E Missing a(5) inserted and wrong a(7) replaced by _Reinhard Zumkeller_, Feb 13 2013
%E Revised by _Natan Arie Consigli_, Jan 23 2016
%E Offset changed to 0 by _Nicholas Matteo_, Aug 21 2019