OFFSET
1,3
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
24 is in the sequence because 24^2 = 576, 24^3 = 13824 and 5 + 7 + 6 = 1 + 3 + 8 + 2 + 4.
MAPLE
a:=proc(n) local nn, nnn: nn:=convert(n^2, base, 10): nnn:=convert(n^3, base, 10): if sum(nn[i], i=1..nops(nn))=sum(nnn[j], j=1..nops(nnn)) then n else fi end: seq(a(n), n=0..620); # Emeric Deutsch, Apr 27 2006
MATHEMATICA
scdsQ[n_]:=Total[IntegerDigits[n^2]]==Total[IntegerDigits[n^3]]; Select[ Range[ 0, 700], scdsQ] (* Harvey P. Dale, Jan 23 2019 *)
PROG
(Magma) [n: n in [0..613] | &+Intseq(n^2) eq &+Intseq(n^3)]; // Bruno Berselli, Jun 28 2011
(PARI) is(n) = sumdigits(n^2) == sumdigits(n^3) \\ David A. Corneth, Sep 05 2020
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 21 2006
EXTENSIONS
Offset corrected by Arkadiusz Wesolowski, Jun 28 2011
STATUS
approved