OFFSET
1,2
COMMENTS
All terms are multiple of 3.
If n is in the sequence, then so is 10*n. - Robert Israel, Apr 05 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
159 is in the sequence because 159^2 = 25281 and 3*159 = 477 have the same digit sum: 18.
MAPLE
select(n -> convert(convert(3*n, base, 10), `+`)=convert(convert(n^2, base, 10), `+`), [seq(i, i=0..1000, 3)]); # Robert Israel, Apr 05 2020
MATHEMATICA
Select[Range[0, 500], Total[IntegerDigits[3 #]] == Total[IntegerDigits[#^2]] &]
PROG
(Magma) [n: n in [0..500] | &+Intseq(3*n) eq &+Intseq(n^2)];
(PARI) isok(n) = sumdigits(3*n) == sumdigits(n^2); \\ Michel Marcus, Nov 17 2015
(Sage) [n for n in (0..500) if sum((3*n).digits())==sum((n^2).digits())] # Bruno Berselli, Nov 17 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Nov 17 2015
STATUS
approved