%I #45 Mar 05 2022 01:02:29
%S 0,0,1,2,11,21,43,69,211,389,779,1276,2753,3405,4167,5029,12317,21691,
%T 42083,68050,234257,279872,331871,390781,458271,533659,618679,713344,
%U 831407,953343,1081455,1222053,2753231,4634203,8637959,13483492,49254279,90224223,102400127
%N Weak Goodstein numbers: a(n) = g_n(n), where g_n(n) is the weak Goodstein function.
%C 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.
%C For instance, the ordinary representation of 34 in base 3 is 3^3 + 2*3 + 1.
%C 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.
%C Define the weak Goodstein function as: g_k(n) = b_(k+1)(g_(k-1)(n))-1, g_0(n) = n.
%C See example for instances.
%C 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.
%C By Goodstein's theorem we conclude that g_k(n) is a finite sequence.
%H Vincenzo Librandi, <a href="/A266202/b266202.txt">Table of n, a(n) for n = 0..200</a>
%H Googology Wiki, <a href="http://googology.wikia.com/wiki/Goodstein_sequence">Weak Goodstein sequence</a>, see below.
%e Find a(5) = g_5(5):
%e g_0(5) = 5;
%e g_1(5) = b_2(5)-1 = b_2(2^2+1)-1 = 3^2+1-1 = 9;
%e g_2(5) = b_3(3^2)-1 = 4^2-1 = 15;
%e g_3(5) = b_4(3*4 + 3)-1 = 3*5+3-1 = 17;
%e g_4(5) = b_5(3*5 + 2)-1 = 3*6 + 2-1 = 19;
%e g_5(5) = b_6(3*6 + 1)-1 = 3*7+1-1 = 21.
%t 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 *)
%o (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
%o (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
%Y Cf. A266201 ("Strong" Goodstein numbers).
%Y Weak Goodstein sequences: A137411: g_n(11); A265034: g_n(266); A267647: g_n(4); A267648: g_n(5); A266203: a(n) = k such that g_k(n)=0.
%K nonn
%O 0,4
%A _Natan Arie Consigli_, Jan 22 2016
%E More terms from _Michel Marcus_, Feb 23 2016