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.

This page as a plain text file.
%I A002334 M0607 N0219 #43 Oct 27 2019 14:06:28
%S A002334 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,
%T A002334 19,17,17,19,21,25,19,19,23,25,23,21,23,21,21,29,23,25,23,27,29,23,31,
%U A002334 33,25,29,27,25,25,27,29,35,31,31,27,29,33,31,29,29,29,29,37,31,41,35
%N A002334 Least positive integer x such that prime A038873(n) = x^2 - 2y^2 for some y.
%C A002334 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
%C A002334 From _Wolfdieter Lang_, Feb 17 2015: (Start)
%C A002334 For the corresponding y terms see A002335.
%C A002334 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)
%D A002334 A. J. C. Cunningham, Quadratic Partitions. Hodgson, London, 1904, p. 1.
%D A002334 D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.
%D A002334 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002334 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002334 Robert Israel, <a href="/A002334/b002334.txt">Table of n, a(n) for n = 1..10000</a>
%H A002334 A. J. C. Cunningham, <a href="/A002330/a002330.pdf">Quadratic Partitions</a>, Hodgson, London, 1904 [Annotated scans of selected pages]
%F A002334 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
%e A002334 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
%p A002334 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
%t A002334 maxPrimePi = 200;
%t A002334 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 *)
%Y A002334 Cf. A002335, A035251.
%K A002334 nonn,easy
%O A002334 1,1
%A A002334 _N. J. A. Sloane_
%E A002334 More terms from Pab Ter (pabrlos(AT)yahoo.com), May 08 2004
%E A002334 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