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.

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

Original entry on oeis.org

5, 7, 11, 9, 13, 17, 13, 19, 23, 17, 15, 21, 25, 17, 23, 27, 35, 23, 29, 21, 41, 25, 31, 23, 35, 29, 39, 43, 37, 31, 27, 49, 53, 33, 31, 37, 47, 41, 55, 59, 31, 45, 39, 49, 37, 35, 61, 37, 35
Offset: 1

Views

Author

Wolfdieter Lang, Feb 12 2015

Keywords

Comments

The corresponding terms y = y2(n) are given in A254931(n).
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).
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.
The second class solutions give the second smallest positive integer solutions of this Pell equation.
For comments and the Nagell reference see A254760.

Examples

			n = 3: 11^2 - 2*7^2 = 23 = A001132(3) = A007522(2).
The first pairs of these second class solutions [x2(n), y2(n)] are (a star indicates primes congruent to 1 (mod 8)):
n  A001132(n)   a(n)  A254931(n)
1     7           5        3
2    17 *         7        4
3    23          11        7
4    31           9        5
5    41 *        13        8
6    47          17       11
7    71          13        7
8    73 *        19       12
9    89 *        17       10
10   97 *        15        8
11  103          21       13
12  113 *        25       16
13  127          17        9
14  137 *        23       14
15  151          27       17
16  167          35       23
17  191          23       13
18  193 *        29       18
19  199          21       11
20  223          41       27
...
		

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

a(n)^2 - 2*A254931(n)^2 = A001132(n), and a(n) is the second largest (proper) positive integer solving this (generalized) Pell equation.
a(n) = 3*A002334(n+1) - 4*A002335(n+1), n >= 1.