OFFSET
0,4
COMMENTS
A nonnegative n in ordinary (depth-1) base-k representation is n rewritten as a linear combination k powers n = n_1*b^m_1 + ... + n_k*b^m_k where 0 < n_i < b and m_1 > ... > m_k >= 0.
For instance, the ordinary representation of 34 in base 3 is 3^3 + 2*3 + 1.
Let b_k(n) be the function that substitutes the bases of the base-k representation of n with the base k+1. E.g., b_3(34) = b_3(3^3 + 2*3 + 1) = 4^3 + 2*4 + 1 = 73.
Define the weak Goodstein function as: g_k(n) = b_(k+1)(g_(k-1)(n))-1, g_0(n) = n.
See example for instances.
Let n be a fixed nonnegative integer: Goodstein's theorem shows that the sequence g_k(n) eventually stabilizes and then decreases by 1 at each step until it reaches 0. Thereafter, all the values of g_k(n) < 0 are not part of the sequence.
By Goodstein's theorem we conclude that g_k(n) is a finite sequence.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Googology Wiki, Weak Goodstein sequence, see below.
EXAMPLE
Find a(5) = g_5(5):
g_0(5) = 5;
g_1(5) = b_2(5)-1 = b_2(2^2+1)-1 = 3^2+1-1 = 9;
g_2(5) = b_3(3^2)-1 = 4^2-1 = 15;
g_3(5) = b_4(3*4 + 3)-1 = 3*5+3-1 = 17;
g_4(5) = b_5(3*5 + 2)-1 = 3*6 + 2-1 = 19;
g_5(5) = b_6(3*6 + 1)-1 = 3*7+1-1 = 21.
MATHEMATICA
g[k_, n_] := If[k == 0, n, Total@ Flatten@ MapIndexed[#1 (k + 2)^(#2 - 1) &, Reverse@ IntegerDigits[#, k + 1]] &@ g[k - 1, n] - 1]; Table[g[n, n], {n, 0, 38}] (* Michael De Vlieger, Mar 18 2016 *)
PROG
(PARI) a(n) = {if (n == 0, return (0)); wn = n; for (k=2, n+1, pd = Pol(digits(wn, k)); wn = subst(pd, x, k+1) - 1; ); wn; } \\ Michel Marcus, Feb 23 2016
(PARI) a(n) = {if (n == 0, return (0)); wn = n; for(k=2, n+1, vd = digits(wn, k); wn = fromdigits(vd, k+1) - 1; ); wn; } \\ Michel Marcus, Feb 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Natan Arie Consigli, Jan 22 2016
EXTENSIONS
More terms from Michel Marcus, Feb 23 2016
STATUS
approved