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

%I #18 Feb 09 2017 17:25:24

%S 7,71,79,191,263,463,599,631,823,863,919,991,1031,1327,1367,1471,1583,

%T 1607,1831,1999,2087,2111,2143,2311,2543,2647,2671,2767,2879,2927,

%U 3119,3623,3767,3823,4327,4447,4463,4663,4783,4799,4951,5023,5119

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

%C Discriminant = -224. See A107132 for more information.

%H Vincenzo Librandi and Ray Chandler, <a href="/A107163/b107163.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[7, 0, 8, 10000] (* see A106856 *)

%o (PARI) list(lim)=my(v=List(),w,t); for(x=1, sqrtint(lim\7), w=7*x^2; for(y=0, sqrtint((lim-w)\8), if(isprime(t=w+8*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 13 2005