cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A002334 Least positive integer x such that prime A038873(n) = x^2 - 2y^2 for some y.

Original entry on oeis.org

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

Views

Author

Keywords

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
From Wolfdieter Lang, Feb 17 2015: (Start)
For the corresponding y terms see A002335.
a(n), together with A002335(n), gives the fundamental positive solution of the first class of this (generalized) Pell equation. The prime 2 has only one class of proper solutions. The fundamental positive solutions of the second class for the primes from A001132 are given in A254930 and A254931. (End)

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).

Crossrefs

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