OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..215
FORMULA
EXAMPLE
17 is in the sequence because 17^2=289 and 2+8+9=19.
1801 is in the sequence because 1801^2=3243601 and 3+2+4+3+6+0+1=19.
MAPLE
A007953 := proc(n) add(d, d=convert(n, base, 10)) ; end:
for n from 1 to 100000 do if A123157(n) = 19 then printf("%d, ", ithprime(n)) ; fi; od: # R. J. Mathar, Sep 29 2009
MATHEMATICA
Select[Prime[Range[800]], Total[IntegerDigits[#^2]]== 19&] (* Vincenzo Librandi, Jun 24 2013 *)
PROG
(Magma) [p: p in PrimesUpTo(6000) | &+Intseq(p^2) eq 19]; // Bruno Berselli, Jun 24 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Sep 21 2009
EXTENSIONS
More terms from R. J. Mathar, Sep 29 2009
STATUS
approved