Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #30 Sep 08 2022 08:45:29
%S 5,7,17,29,37,47,53,61,73,79,83,89,107,109,127,137,149,151,173,181,
%T 199,223,263,269,271,277,281,349,367,379,389,433,443,457,461,503,521,
%U 547,557,587,601,613,673,677,683,691,701,727,739,773,827,853,857,863,887
%N Primes p such that the sum of the decimal digits of p^2 is also a prime.
%C 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]
%C This comment is trivially true: after 3, the square of each prime has the form 6*k+1. [_Bruno Berselli_, Jun 06 2014]
%H Vincenzo Librandi, <a href="/A126142/b126142.txt">Table of n, a(n) for n = 1..1000</a>
%e 5^2=25, 2+5=7.
%e 7^2=49, 4+9=13.
%e 17^2=289, 2+8+9=19.
%p 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);
%t Select[Prime[Range[1000]], PrimeQ[Apply[Plus, IntegerDigits[#^2]]] &] (* _Vincenzo Librandi_, Jun 06 2014 *)
%o (Magma) [p: p in PrimesUpTo(1000) | IsPrime(&+Intseq(p^2))]; // _Klaus Brockhaus_, Nov 23 2010
%K nonn,base,easy
%O 1,1
%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Mar 07 2007
%E Definition reworded by _Klaus Brockhaus_, Nov 23 2010