Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Jun 13 2022 12:37:12
%S 0,1,2,3,11,31,191,1023
%N a(n) = MAX(g_k(n)) where g_k(n) is the function defined in A266202.
%e g_1(4) = b_2(4)-1 = b_2(2^2)-1 = 3^2-1 = 8;
%e g_2(4) = b_3(2*3+2)-1 = 2*4 + 2-1 = 9;
%e g_3(4) = b_4(2*4 + 1 ) -1 = 2*5 + 1-1 = 10;
%e g_4(4) = b_5(2*5) -1= 2*6 - 1 = 11;
%e g_5(4) = b_6(6+5)-1 = 7+5-1 = 11;
%e g_6(4) = b_7(7+4)-1 = 8+4-1 = 11;
%e g_7(4) = b_8(8+3)-1 = 9+3-1 = 11;
%e g_8(4) = b_9(9+2)-1 = 10+2-1 = 11;
%e g_9(4) = b_10(10+1)-1 = 11+1-1 = 11;
%e g_10(4) = b_11(11)-1 = 12-1 = 11;
%e g_11(4) = b_12(11)-1 = 11-1 = 10;
%e g_12(4) = b_13(10)-1 = 10-1 = 9;
%e g_13(4) = b_14(9)-1 = 9-1 = 8;
%e …
%e g_21(4) = 0;
%e So a(4)=11.
%o (PARI) g(n, k) = {if (n == 0, return (k)); wn = k; for (k=2, n+1, pd = Pol(digits(wn, k)); wn = subst(pd, x, k+1) - 1; ); wn; }
%o a(n) = {vg = []; ok = 1; ns = 0; while(ok, newg = g(ns, n); vg = concat(vg, newg); if (newg <= 0, ok = 0); ns++;); vmax = vecmax(vg); vmax;} \\ _Michel Marcus_, Apr 04 2016; corrected Jun 13 2022
%Y Cf. A266203, A268688, A268689.
%K nonn,more
%O 0,3
%A _Natan Arie Consigli_, Apr 02 2016
%E a(6)-a(7) from _Michel Marcus_, Apr 04 2016