login
Primes of the form 5x^2 + 26y^2.
1

%I #18 Sep 08 2022 08:45:34

%S 5,31,71,109,149,151,229,239,271,349,359,421,431,461,479,509,541,631,

%T 661,709,821,839,941,1021,1061,1151,1181,1229,1279,1319,1399,1471,

%U 1549,1669,1709,1789,1831,1861,1879,2039,2069,2111,2221,2269,2309

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

%C Discriminant = -520. See A139827 for more information.

%H Vincenzo Librandi and Ray Chandler, <a href="/A139862/b139862.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)

%F The primes are congruent to {5, 21, 31, 71, 109, 111, 119, 141, 149, 151, 189, 229, 239, 271, 279, 301, 319, 349, 359, 421, 431, 461, 479, 501, 509} (mod 520).

%t QuadPrimes2[5, 0, 26, 10000] (* see A106856 *)

%o (Magma) [ p: p in PrimesUpTo(3000) | p mod 520 in {5, 21, 31, 71, 109, 111, 119, 141, 149, 151, 189, 229, 239, 271, 279, 301, 319, 349, 359, 421, 431, 461, 479, 501, 509}]; // _Vincenzo Librandi_, Jul 29 2012

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

%K nonn,easy

%O 1,1

%A _T. D. Noe_, May 02 2008