OFFSET
0,1
LINKS
Nicholas Matteo, Table of n, a(n) for n = 0..10000
R. L. Goodstein, On the Restricted Ordinal Theorem, The Journal of Symbolic Logic 9, no. 2 (1944), 33-41.
Wikipedia, Goodstein sequence
EXAMPLE
G_0(5) = 5;
G_1(5) = B_2(5) - 1 = B_2(2^2 + 1) - 1 = 27;
G_2(5) = B_3(3^3) - 1 = 4^4 - 1 = 255;
G_3(5) = B_4(3*4^3 + 3*4^2 + 3*4 + 3) - 1 = 3*5^3 + 3*5^2 + 3*5 + 3 - 1 = 467.
PROG
(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)); }
lista(nn) = {print1(a = 5, ", "); for (n=2, nn, a = bump(a, n)-1; print1(a, ", "); ); } \\ Michel Marcus, Feb 28 2016
CROSSREFS
KEYWORD
nonn,fini
AUTHOR
Natan Arie Consigli, Jan 22 2016
STATUS
approved