OFFSET
1,3
COMMENTS
A prime p is representable in the form x^2-2y^2 iff p is 2 or p == 1 or 7 mod 8. - Pab Ter (pabrlos2(AT)yahoo.com), Oct 22 2005
REFERENCES
A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
A. J. C. Cunningham, Quadratic Partitions, Hodgson, London, 1904 [Annotated scans of selected pages]
MAPLE
with(numtheory): readlib(issqr):for i from 1 to 300 do p:=ithprime(i): pmod8:=modp(p, 8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do if issqr(p+2*y^2) then printf("%d, ", y): break fi od fi od: # Pab Ter, Oct 22 2005
MATHEMATICA
maxPrimePi = 200;
Reap[Do[If[MatchQ[Mod[p, 8], 1|2|7], rp = Reduce[x > 0 && y > 0 && p == x^2 - 2*y^2, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; y0 = xy[[All, 2]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[y0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 22 2005
STATUS
approved