login
A065408
Squares whose digits sum to a prime.
3
16, 25, 49, 256, 289, 625, 676, 784, 841, 1024, 1156, 1369, 1444, 1600, 1936, 2209, 2401, 2500, 2704, 2809, 3136, 3721, 3844, 4096, 4225, 4900, 5329, 6241, 6724, 6889, 7921, 8281, 9604, 11236, 11449, 11881, 13225, 13456, 13924, 14161, 15625, 16129
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[1000]^2, PrimeQ[Total[IntegerDigits[#]]]&]
PROG
(PARI) SumD(x)= { local(s=0); while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } { n=0; for (m=1, 10^9, if (isprime(SumD(m^2)), write("b065408.txt", n++, " ", m^2); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 18 2009
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Nov 22 2001
STATUS
approved