OFFSET
1,2
LINKS
Bruno Berselli, Table of n, a(n) for n = 1..1000
MathStackExchange, Numbers n such that the digit sum of n2 is a square, 2015-2016.
EXAMPLE
6^2 = 36 and 3+6 = 9 is a square. 13^2 = 169 and 1+6+9 = 16 is a square.
MAPLE
readlib(issqr): f := []: for n from 1 to 200 do if issqr(convert(convert(n^2, base, 10), `+`)) then f := [op(f), n] fi; od; f;
MATHEMATICA
Select[Range[185], IntegerQ[Sqrt[Total[IntegerDigits[#^2]]]] &] (* Jayanta Basu, May 06 2013 *)
PROG
(Magma) [ n: n in [1..185] | IsSquare(&+Intseq(n^2)) ]; // Bruno Berselli, Jul 29 2011
(PARI) is(n)=n=eval(Vec(Str(n^2))); issquare(sum(i=1, #n, n[i])) \\ Charles R Greathouse IV, Jul 29 2011
(PARI) select( is_A061910(n)=issquare(sumdigits(n^2)), [0..199]) \\ Includes the initial 0. - M. F. Hasler, Oct 16 2017
(Python)
from gmpy2 import is_square
A061910 = [n for n in range(1, 10**3) if is_square(sum(int(d) for d in str(n*n)))] # Chai Wah Wu, Sep 03 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Asher Auel, May 17 2001
STATUS
approved