%I #15 Aug 02 2024 02:59:02
%S 25,49,121,289,361,841,1369,1849,2209,2809,3721,5041,5329,6241,7921,
%T 9409,10201,11449,11881,16129,29929,36481,39601,49729,58081,63001,
%U 69169,73441,78961,100489,134689,151321,157609,187489,192721,196249,201601
%N Squares of the form 6p+7 for p prime (A110015) that are squares of a prime.
%H Amiram Eldar, <a href="/A110586/b110586.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%F a(n) = A110587(n)^2. - _Amiram Eldar_, Aug 02 2024
%e a(4) = 289 since 289 = 17^2 and 289 = 6*47 + 7.
%p ispower := proc(n,b) andmap(proc(w) evalb(w[2] mod b = 0) end, ifactors(n)[2]) end: a:=6: PW6:=[]: for z from 1 to 1 do for n from 1 to 10000 do p:=ithprime(n); m:=a*p+a+1; if ispower(m,2) and isprime(sqrt(m)) then PW6:=[op(PW6),m] fi od; od;
%t Select[Prime[Range[100]]^2,PrimeQ[(#-7)/6]&] (* _Harvey P. Dale_, May 09 2012 *)
%o (PARI) list(lim)=my(v=List(),p); forprime(q=5,sqrtint(lim\1*6+7), if(isprime(p=(q^2-7)/6), listput(v,p))); Vec(v) \\ _Charles R Greathouse IV_, Sep 20 2016
%Y Cf. A110014, A110015, A110016, A110587.
%K nonn,easy
%O 1,1
%A _Walter Kehowski_, Sep 13 2005