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

%I #16 Feb 10 2017 16:23:55

%S 101,109,149,181,269,389,401,409,449,461,521,541,569,761,829,929,941,

%T 1021,1061,1069,1129,1361,1429,1489,1601,1609,1621,1721,1741,1861,

%U 1889,1949,2081,2129,2269,2309,2441,2549,2609,2621,2689,2749,2789

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

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

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

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