OFFSET
1,2
COMMENTS
Like Keith numbers but starting from n^9 digits to reach n.
Consider the digits of n^9. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.
EXAMPLE
196^9 = 426878854210636742656:
4 + 2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 = 100;
2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 + 100 = 196.
MAPLE
with(numtheory): P:=proc(q, h, w) local a, b, k, t, v; global n; v:=array(1..h);
for n from 1 to q do b:=n^w; a:=[];
for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]<n do t:=t+1; v[t]:=add(v[k], k=t-b..t-1);
od; if v[t]=n then print(n); fi; od; end: P(10^6, 10000, 9);
MATHEMATICA
(* function keithQ[ ] is defined in A007629 *)
a281920[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 9]&]]
a281920[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Feb 02 2017
EXTENSIONS
a(24) from Jinyuan Wang, Feb 02 2020
a(25)-a(33) from Giovanni Resta, Feb 03 2020
STATUS
approved