OFFSET
1,1
COMMENTS
a(n)^2 is of the form 6*k+1. [Vincenzo Librandi, Sep 21 2009; edited by Klaus Brockhaus, Nov 23 2009; edited by Bruno Berselli, Jun 06 2014]
This comment is trivially true: after 3, the square of each prime has the form 6*k+1. [Bruno Berselli, Jun 06 2014]
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
5^2=25, 2+5=7.
7^2=49, 4+9=13.
17^2=289, 2+8+9=19.
MAPLE
P:=proc(n) local i, k, w; for i from 1 by 1 to n do w:=0; k:=ithprime(i)^2; while k>0 do w:=w+(k-trunc(k/10)*10); k:=trunc(k/10); od; if isprime(w) then print(ithprime(i), w); fi; od; end: P(1000);
MATHEMATICA
Select[Prime[Range[1000]], PrimeQ[Apply[Plus, IntegerDigits[#^2]]] &] (* Vincenzo Librandi, Jun 06 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(1000) | IsPrime(&+Intseq(p^2))]; // Klaus Brockhaus, Nov 23 2010
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Mar 07 2007
EXTENSIONS
Definition reworded by Klaus Brockhaus, Nov 23 2010
STATUS
approved