A002334 Least positive integer x such that prime A038873(n) = x^2 - 2y^2 for some y.
2, 3, 5, 5, 7, 7, 7, 11, 9, 9, 11, 13, 11, 11, 15, 13, 13, 13, 17, 15, 19, 15, 19, 17, 21, 17, 19, 17, 17, 19, 21, 25, 19, 19, 23, 25, 23, 21, 23, 21, 21, 29, 23, 25, 23, 27, 29, 23, 31, 33, 25, 29, 27, 25, 25, 27, 29, 35, 31, 31, 27, 29, 33, 31, 29, 29, 29, 29, 37, 31, 41, 35
Offset: 1
Examples
The first solutions [x(n), y(n)] are (the prime is given as first entry): [2,[2,1]], [7,[3,1]], [17,[5,2]], [23,[5,1]], [31,[7,3]], [41,[7,2]], [47,[7,1]], [71,[11,5]], [73,[9,2]], [79,[9,1]], [89,[11,4]], [97,[13,6]], [103,[11,3]], [113,[11,2]], [127,[15,7]], [137,[13,4]], [151,[13,3]], [167,[13,1]], [191,[17,7]], [193,[15,4]], [199,[19,9]], [223,[15,1]], [233,[19,8]], [239,[17,5]], [241,[21,10]], [257,[17,4]], [263,[19,7]], [271,[17,3]], ... - _Wolfdieter Lang_, Feb 17 2015
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]
Programs
-
Maple
with(numtheory): readlib(issqr): for i from 1 to 250 do p:=ithprime(i): pmod8:=modp(p,8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do x2:=p+2*y^2: if issqr(x2) then printf("%d,",sqrt(x2)): break fi od fi od: # Pab Ter, May 08 2004
-
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]}; x0 = xy[[All, 1]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[x0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)
Formula
a(n)^2 - 2*A002335(n)^2 = A038873(n), n >= 1, and a(n) is the least positive integer satisfying this Pell type equation. - Wolfdieter Lang, Feb 12 2015
Extensions
More terms from Pab Ter (pabrlos(AT)yahoo.com), May 08 2004
The name has been changed in order to be more precise and to conform with A002335. The offset has been changed to 1. - Wolfdieter Lang, Feb 12 2015
Comments