OFFSET
1,3
COMMENTS
The sequence is clearly infinite, since we can add trailing zeros. Is the subset of values not ending in 0 infinite too (see A114135)?
LINKS
David A. Corneth, Table of n, a(n) for n = 1..1124 (using the b-file in A114135).
EXAMPLE
468 is in the sequence since 468^2 = 219024 and 468^3 = 102503232 and we have 18 = 4+6+8 = 2+1+9+0+2+4 = 1+0+2+5+0+3+2+3+2.
5851 is in the sequence because 5851, 34234201 (= 5851^2) and 200304310051 (=5851^3) all have digital sum 19.
MAPLE
s:=proc(n) local nn: nn:=convert(n, base, 10): sum(nn[j], j=1..nops(nn)): end: a:=proc(n) if s(n)=s(n^2) and s(n)=s(n^3) then n else fi end: seq(a(n), n=0..1000000); # Emeric Deutsch, May 13 2006
MATHEMATICA
SumOfDig[n_]:=Apply[Plus, IntegerDigits[n]]; Do[s=SumOfDig[n]; If[s==SumOfDig[n^2] && s==SumOfDig[n^3], Print[n]], {n, 10^6}]
Select[Range[0, 10000000], Length[Union[Total/@IntegerDigits[{#, #^2, #^3}]]] == 1&] (* Harvey P. Dale, Apr 26 2014 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Giovanni Resta, Nov 21 2005
EXTENSIONS
b-file Corrected by David A. Corneth, Jul 22 2021
STATUS
approved