%I #33 Sep 04 2019 17:21:32
%S 4,26,41,60,83,109,139,173,211,253,299,348,401,458,519,584,653,726,
%T 803,884,969,1058,1151,1222,1295,1370,1447,1526,1607,1690,1775,1862,
%U 1951,2042,2135,2230,2327,2426,2527,2630,2735,2842,2951,3062,3175,3290,3407
%N Goodstein sequence starting with 4: 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 Goodstein's theorem shows that such a sequence converges to zero for any starting value [e.g. if a(0)=1 then a(1)=0; if a(0)=2 then a(3)=0; and if a(0)=3 then a(5)=0]. With a(0)=4 we have a(3*2^(3*2^27 + 27) - 3)=0, which is well beyond the 10^(10^8)-th term.
%C The second half of such sequences is declining and the previous quarter is stable.
%C The resulting sequence 0,1,3,5,3*2^402653211 - 3, ... (see Comments in A056041) grows too rapidly to have its own entry.
%H Reinhard Zumkeller, <a href="/A056193/b056193.txt">Table of n, a(n) for n = 0..10000</a> (final 2 terms from Nicholas Matteo)
%H R. L. Goodstein, <a href="https://www.jstor.org/stable/2268019">On the Restricted Ordinal Theorem</a>, The Journal of Symbolic Logic, Vol. 9, No. 2 (1944), 33-41.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GoodsteinSequence.html">Goodstein Sequence.</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Goodstein%27s_theorem">Goodstein's Theorem</a>
%H Reinhard Zumkeller, <a href="/A211378/a211378.hs.txt">Haskell programs for Goodstein sequences</a>
%e a(0) = 4 = 2^2,
%e a(1) = 3^3 - 1 = 26 = 2*3^2 + 2*3 + 2,
%e a(2) = 2*4^2 + 2*4 + 2 - 1 = 41 = 2*4^2 + 2*4 + 1,
%e a(3) = 2*5^2 + 2*5 + 1 - 1 = 60 = 2*5^2 + 2*5,
%e a(4) = 2*6^2 + 2*6 - 1 = 83 = 2*6^2 + 6 + 5,
%e a(5) = 2*7^2 + 7 + 5 - 1 = 109 etc.
%o (Haskell) See Zumkeller link
%o (PARI) lista(nn) = {print1(a = 4, ", "); for (n=2, nn, pd = Pol(digits(a, n)); q = sum(k=0, poldegree(pd), if (c=polcoeff(pd, k), c*x^subst(Pol(digits(k, n)), x, n+1), 0)); a = subst(q, x, n+1) - 1; print1(a, ", "););} \\ _Michel Marcus_, Feb 22 2016
%Y Cf. A056041, A056004, A057650, A059934, A059935, A059936, A271977.
%Y Cf. A215409, A266204, A271554, A222117, A059933, A211378.
%K nonn,fini
%O 0,1
%A _Henry Bottomley_, Aug 02 2000
%E Edited by _N. J. A. Sloane_, Mar 06 2006
%E Offset changed to 0 by _Nicholas Matteo_, Sep 04 2019