OFFSET
1,3
COMMENTS
Previous name: Numbers n such that Sum_{i=1..r, x(i)^2} is a perfect square, where x(i) = digits of n. r=1+floor(log_10 n).
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
EXAMPLE
34 is a term: 3^2 + 4^2 = 25 = 5^2.
122 is a term: 1^2 + 2^2 + 2^2 = 9 = 3^2.
MATHEMATICA
Select[Range[0, 666], IntegerQ[Sqrt[Plus @@ (IntegerDigits[#]^2)]] &] (* Ivan Neretin, Aug 03 2015 *)
PROG
(PARI) isok(n) = {digs = Vec(Str(n)); issquare(sum(i=1, #digs, eval(digs[i])^2))} \\ Michel Marcus, Jun 02 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Ctibor O. Zizka, Apr 30 2010
EXTENSIONS
Corrected and extended by Neven Juric, Jul 12 2010
Simpler definition by Michel Marcus, Jun 02 2013
STATUS
approved