cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A274770 Cube analog to Keith numbers.

This page as a plain text file.
%I A274770 #17 Jun 02 2021 22:22:42
%S A274770 1,8,17,18,26,27,44,55,63,80,105,187,326,776,1095,2196,6338,13031,
%T A274770 13131,25562,27223,70825,140791,553076,632489,1402680,1404312,3183253,
%U A274770 11311424,50783292,51231313,182252596,255246098,522599548,1180697763,2025114819,2137581414
%N A274770 Cube analog to Keith numbers.
%C A274770 Like Keith numbers but starting from n^3 digits to reach n.
%C A274770 Consider the digits of the cube of a number n . Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.
%e A274770 776^3 = 467288576 :
%e A274770 4 + 6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 = 53;
%e A274770 6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 = 102;
%e A274770 7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 = 198;
%e A274770 2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 = 389;
%e A274770 8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 + 389 = 776.
%p A274770 with(numtheory): P:=proc(q, h) local a,b,k,n,t,v; v:=array(1..h);
%p A274770 for n from 1 to q do b:=n^3; a:=[];
%p A274770 for k from 1 to ilog10(b)+1 do a:=[(b mod 10),op(a)]; b:=trunc(b/10); od;
%p A274770 for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^3)+1;
%p A274770 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);
%p A274770 od; if v[t]=n then print(n); fi; od; end: P(10^6, 10000);
%t A274770 (* function keithQ[ ] is defined in A007629 *)
%t A274770 a274770[n_] := Join[{1, 8}, Select[Range[10, n], keithQ[#, 3]&]]
%t A274770 a274770[10^6] (* _Hartmut F. W. Hoft_, Jun 02 2021 *)
%Y A274770 Cf. A007629, A246544, A263534, A274769.
%K A274770 nonn,base
%O A274770 1,2
%A A274770 _Paolo P. Lava_, Jul 06 2016
%E A274770 a(34)-a(37) from _Giovanni Resta_, Jul 08 2016