OFFSET
1,1
COMMENTS
Every prime of the form 8n+1 or 8n+3 has a unique representation of the form x^2 + 2y^2 with positive integers x and y. This sequence has the primes for which y<=x.
REFERENCES
Morris Kline, Mathematical Thought From Ancient to Modern Times, Oxford University Press 1972, p. 276 (Fermat prime number theorems).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
MATHEMATICA
Select[Flatten[Table[x^2+2y^2, {x, 0, 30}, {y, 0, x}]], PrimeQ]
PROG
(PARI) sqplus2sq(n, m) = ct=0; for(x=1, n, for(y=1, x, s = x^2+m*y^2; if(isprime(s), ct+=1; print1(s" "); ); ); ); \\ Lists primes of the form x^2+m*y^2 with 1<=y<=x<=n.
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 05 2002
EXTENSIONS
Edited by Dean Hickerson, Dec 12 2002
STATUS
approved