Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Oct 28 2019 07:44:54
%S 5,7,11,9,13,17,13,19,23,17,15,21,25,17,23,27,35,23,29,21,41,25,31,23,
%T 35,29,39,43,37,31,27,49,53,33,31,37,47,41,55,59,31,45,39,49,37,35,61,
%U 37,35
%N Fundamental positive solution x = x2(n) of the second class of the Pell equation x^2 - 2*y^2 = A001132(n), n >= 1 (primes congruent to 1 or 7 mod 8).
%C The corresponding terms y = y2(n) are given in A254931(n).
%C There is only one fundamental solution for prime 2 (no second class exists), and this solution (x, y) has been included in (A002334(1), A002335(1)) = (2, 1).
%C The second class x sequence for the primes 1 (mod 8), which are given in A007519, is A254762, and for the primes 7 (mod 8), given in A007522, it is A254766.
%C The second class solutions give the second smallest positive integer solutions of this Pell equation.
%C For comments and the Nagell reference see A254760.
%F a(n)^2 - 2*A254931(n)^2 = A001132(n), and a(n) is the second largest (proper) positive integer solving this (generalized) Pell equation.
%F a(n) = 3*A002334(n+1) - 4*A002335(n+1), n >= 1.
%e n = 3: 11^2 - 2*7^2 = 23 = A001132(3) = A007522(2).
%e The first pairs of these second class solutions [x2(n), y2(n)] are (a star indicates primes congruent to 1 (mod 8)):
%e n A001132(n) a(n) A254931(n)
%e 1 7 5 3
%e 2 17 * 7 4
%e 3 23 11 7
%e 4 31 9 5
%e 5 41 * 13 8
%e 6 47 17 11
%e 7 71 13 7
%e 8 73 * 19 12
%e 9 89 * 17 10
%e 10 97 * 15 8
%e 11 103 21 13
%e 12 113 * 25 16
%e 13 127 17 9
%e 14 137 * 23 14
%e 15 151 27 17
%e 16 167 35 23
%e 17 191 23 13
%e 18 193 * 29 18
%e 19 199 21 11
%e 20 223 41 27
%e ...
%t Reap[For[p = 2, p < 1000, p = NextPrime[p], If[MatchQ[Mod[p, 8], 1|7], rp = Reduce[x > 0 && y > 0 && x^2 - 2 y^2 == p, {x, y}, Integers]; If[rp =!= False, xy = {x, y} /. {ToRules[rp /. C[1] -> 1]}; x2 = xy[[-1, 1]] // Simplify; Print[x2]; Sow[x2]]]]][[2, 1]] (* _Jean-François Alcover_, Oct 28 2019 *)
%Y Cf. A001132, A254931, A002334, A002335, A007519, A254762, A007522, A254766, A254760.
%K nonn,easy
%O 1,1
%A _Wolfdieter Lang_, Feb 12 2015