login
Primes of the form 2x^2 + 7y^2.
2

%I #19 Feb 09 2017 12:43:21

%S 2,7,71,79,113,191,193,263,337,401,457,463,569,599,617,631,641,809,

%T 823,863,919,991,1009,1031,1201,1289,1297,1327,1367,1471,1583,1607,

%U 1801,1831,1913,1999,2087,2111,2143,2153,2297,2311,2473,2521,2543

%N Primes of the form 2x^2 + 7y^2.

%C Discriminant = -56.

%H Vincenzo Librandi and Ray Chandler, <a href="/A106917/b106917.txt">Table of n, a(n) for n = 1..10000</a> [First 1000 terms from Vincenzo Librandi]

%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)

%t QuadPrimes2[2, 0, 7, 10000] (* see A106856 *)

%o (PARI) list(lim)=my(v=List(),w,t); for(x=0, sqrtint(lim\2), w=2*x^2; for(y=0, sqrtint((lim-w)\7), if(isprime(t=w+7*y^2), listput(v,t)))); Set(v) \\ _Charles R Greathouse IV_, Feb 09 2017

%K nonn,easy

%O 1,1

%A _T. D. Noe_, May 09 2005