A218771 Primes of the form p^2 + 3pq + q^2 with p and q prime.
31, 59, 79, 179, 191, 229, 251, 311, 389, 401, 479, 491, 541, 569, 719, 809, 971, 1019, 1061, 1109, 1151, 1249, 1301, 1409, 1451, 1499, 1619, 1931, 1949, 2111, 2141, 2339, 2591, 2609, 2711, 2801, 2939, 3089, 3371, 3389, 3449, 3881, 4021, 4091, 4211, 4391, 4451, 4679, 5039, 5051
Offset: 1
Keywords
Examples
a(1)=31 since 2^2 + 3*2*3 + 3^2 = 31 and 2,3,31 are prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv preprint arXiv:1211.1588, 2012.
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] i=0; Do[Do[If[SQ[4Prime[n]+5Prime[k]^2] && PrimeQ[(Sqrt[4Prime[n] + 5Prime[k]^2] - 3Prime[k])/2] == True, i=i+1; Print[i," ", Prime[n]]; Goto[aa]], {k,1,PrimePi[Sqrt[Prime[n]/5]]}]; Label[aa];Continue,{n,1,1000000}]
-
PARI
list(lim)=my(v=List(),t);forprime(p=2, sqrtint(lim\4), forprime(q=p+1,sqrt(lim-p^2), if(isprime(t=p^2+3*p*q+q^2), listput(v,t), if(t>lim,break)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Nov 05 2012
-
PARI
is_A218771(n,v=0)={ my(r,c=0); isprime(n) & forprime( q=1,sqrtint(n\5), issquare(4*n+5*q^2, &r) || next; isprime((r-3*q)/2) || next; v || return(1); v>1 & print1([q,(r-3*q)/2]","); c++);c} \\ - M. F. Hasler, Nov 05 2012
Comments