OFFSET
1,1
COMMENTS
Subsequence of A008585.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
6 is in sequence because 6^2 = 36 and 3+6 = 9.
MAPLE
filter:= proc(n) convert(convert(n^2, base, 10), `+`) = 9 end proc:select(filter, [$1..10^5]); # Robert Israel, Jan 04 2024
MATHEMATICA
Select[Range[10^5], Total[IntegerDigits[#^2]] == 9 &]
PROG
(Magma) [n: n in [1..2*10^4] | &+Intseq(n^2) eq 9 ];
(PARI) for(n=1, 1e8, if (sumdigits(n^2) == 9, print1(n", "))) \\ Altug Alkan, Sep 28 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Sep 28 2015
STATUS
approved