login
Primes of the form 3x^2 + 28y^2.
1

%I #18 Feb 10 2017 14:42:40

%S 3,31,103,139,271,523,619,691,727,787,811,1063,1123,1399,1447,1531,

%T 1567,1699,1783,1867,1879,1987,2239,2287,2467,2551,2659,2803,2887,

%U 2971,3163,3307,3331,3391,3463,3559,3583,3631,3967,4219,4591,4639

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

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

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

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

%K nonn,easy

%O 1,1

%A _T. D. Noe_, May 13 2005