OFFSET
1,1
REFERENCES
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 36.
LINKS
Vincenzo Librandi and Ray Chandler, Table of n, a(n) for n = 1..10000 [First 2000 terms from Vincenzo Librandi]
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
FORMULA
Same as primes congruent to 1, 9, 11, or 19 mod 40. See, e.g., Cox, p. 36.
a(n) ~ 4n log n. - Charles R Greathouse IV, Nov 09 2012
MATHEMATICA
Clear[f, lst, p, x, y]; f[x_, y_]:=x^2+10*y^2; lst={}; Do[Do[p=f[x, y]; If[PrimeQ[p]&&p<7212, AppendTo[lst, p]], {y, 0, 6!}], {x, 0, 6!}]; Take[Union[lst], 222] (* Vladimir Joseph Stephan Orlovsky, Aug 04 2009 *)
QuadPrimes2[1, 0, 10, 10000] (* see A106856 *)
PROG
(PARI) select(n->vecsearch([1, 9, 11, 19], n%40), primes(100)) \\ Charles R Greathouse IV, Nov 09 2012
(Magma) [p: p in PrimesUpTo(1500) | NormEquation(10, p) eq true]; // Bruno Berselli, Jul 03 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved