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.

Showing 1-6 of 6 results.

A254760 Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = A007519(n), n>=1 (primes congruent to 1 mod 8).

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Feb 10 2015

Keywords

Comments

For the corresponding term y1(n) see 2*A254761(n).
For the positive fundamental proper (sometimes called primitive) solutions x2(n) and y2(n) of the second class of this (generalized) Pell equation see A254762(n) and 2*A254763(n).
The present solutions of this first class are the smallest positive ones.
See the Nagell reference Theorem 111, p. 210, for the proof of the existence of solutions (the discriminant of this binary quadratic form is +8 hence it is an indefinite form with an infinitude of solutions if there exists at least one).
See the Nagell reference Theorem 110, p. 208, for the proof that there are only two classes of solutions for this Pell equation, because the equation is solvable and the primes from A007519 do not divide 4.
The present fundamental solutions are found according to the Nagell reference Theorem 108, p. 205, adapted to the case at hand, by scanning the following two inequalities for solutions x1(n) = 2*X1(n) + 1 and y1(n) = 2*Y1(n). The intervals to be scanned are ceiling((sqrt(8 + p(n))-1)/2) <= X1(n) <= floor((sqrt(2*p(n))-1)/2), with p(n) = A007519(n), and
1 <= Y1(n) <= floor(sqrt(A005123(n))).
The general positive proper solutions are for both classes obtained by applying positive powers of the matrix M = [[3,4],[2,3]] on the positive fundamental column vectors (x(n),y(n))^T. The n-th power M^n = S(n-1, 6)*M - S(n-2, 6) 1_2 , where 1_2 is the 2 X 2 identity matrix and S(n, 6), with S(-2, 6) = -1 and S(-1, 6) = 0 is the Chebyshev S-polynomial evaluated at x = 6, given in A001109(n).
The least positive x solutions (that is the ones of the first class) for the primes +1 and -1 (mod 8) together (including in the first class also the prime 2) are given in A002334. - Wolfdieter Lang, Feb 12 2015

Examples

			The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are (we list the prime A007519(n) as first entry):
[17, [5, 2]], [41, [7, 2]], [73, [9, 2]], [89, [11, 4]], [97, [13, 6]], [113, [11, 2]], [137, [13, 4]], [193, [15, 4]], [233, [19, 8]], [241, [21, 10]], [257, [17, 4]], [281, [17, 2]], [313, [21, 8]], [337, [25, 12]], [353, [19, 2]], [401, [23, 8]], [409, [21, 4]], ...
n=1: 5^2 - 2*2^2 = 25 - 8 = 17, ...
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

Formula

a(n)^2 - 2*(2*A254760(n))^2 = A007519(n) gives the smallest positive (proper) solution of this (generalized) Pell equation.

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

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 5, 2, 1, 4, 6, 3, 2, 7, 4, 3, 1, 7, 4, 9, 1, 8, 5, 10, 4, 7, 3, 2, 5, 8, 12, 2, 1, 9, 11, 8, 4, 7, 2, 1, 14, 6, 9, 5, 11, 13, 2, 14, 16, 4, 11, 8, 3, 2, 7, 10, 17, 12, 11, 1, 7, 13, 10, 6, 4, 3, 1, 16, 7, 20, 13, 5, 15, 4, 12, 2, 21, 14, 11, 7, 16, 13, 18, 5, 20, 9, 1, 8, 17, 14
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

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 300 do p:=ithprime(i): pmod8:=modp(p,8): if p=2 or pmod8=1 or pmod8=7 then for y from 1 do if issqr(p+2*y^2) then printf("%d,",y): break fi od fi od: # Pab Ter, Oct 22 2005
  • 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]}; y0 = xy[[All, 2]] // Min // Simplify; Print[{p, xy[[1]]} ]; Sow[y0]]], {p, Prime[Range[maxPrimePi]]}]][[2, 1]] (* Jean-François Alcover, Oct 27 2019 *)

Extensions

More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 22 2005

A255235 Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = -A038873(n), n>=1 (primes congruent to {1,2,7} mod 8).

Original entry on oeis.org

4, 1, 1, 3, 1, 3, 5, 1, 5, 7, 3, 1, 5, 7, 1, 5, 7, 11, 3, 7, 1, 13, 3, 7, 1, 9, 5, 11, 13, 9, 5, 1, 15, 17, 5, 3, 7, 13, 9, 17, 19, 1, 11, 7, 13, 5, 3, 19, 3, 1, 17, 7, 11, 19, 21, 13, 9, 1, 7, 9, 25, 15, 7, 11, 17, 21, 23, 27, 5
Offset: 1

Views

Author

Wolfdieter Lang, Feb 25 2015

Keywords

Comments

For the corresponding term y1(n) see A255246(n).
The present solutions of this first class are the smallest positive ones.
For the positive fundamental proper (sometimes called primitive) solutions x2 and y2 of the second class of this (generalized) Pell equation see A255247 and A255248. There is no second class for prime 2.
For the first class solutions of this Pell equation with primes 1 (mod 8) see A254934 and A254935. For those with primes 7 (mod 8) see A254938 and 2*A255232. For the derivation of these solutions see A254934 and A254938, also for the Nagell reference.

Examples

			The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are
  (the prime A038873(n) is listed as first entry):
  [2,[4, 3]], [7, [1, 2]], [17, [1, 3]],
  [23, [3, 4]], [31, [1, 4]], [41, [3, 5]],
  [47, [5, 6]], [71, [1, 6]], [73, [5, 7]],
  [79, [7, 8]], [89, [3, 7]], [97, [1, 7]],
  [103, [5, 8]], [113, [7, 9]], [127, [1, 8]],
  [137, [5, 9]], [151, [7, 10]], [167, [11, 12]], [191, [3, 10]], [193, [7, 11]], [199, [1, 10]], [223, [13, 14]], [233, [3, 11]], [239, [7, 12]], [241, [1, 11]], [257, [9, 13]], [263, [5, 12]], ...
n=1: 4^2 - 2*3^2 = -2 = -A038873(1),
n=2: 1^2 - 2*2^2 = 1 - 8 = -7 = -A038873(2).
		

Crossrefs

Formula

a(n)^2 - A255246(n)^2 = - A038873(n), n >= 1, gives the smallest positive (proper) solution of this (generalized) Pell equation.

Extensions

More terms from Colin Barker, Feb 26 2015

A254764 Fundamental positive solution x = x1(n) of the first class of the Pell equation x^2 - 2*y^2 = A007522(n), n >=1 (primes congruent to 7 mod 8).

Original entry on oeis.org

3, 5, 7, 7, 11, 9, 11, 15, 13, 13, 17, 19, 15, 17, 19, 17, 19, 19, 23, 25, 23, 21, 25, 23, 27, 29, 29, 25, 27, 35, 31, 27, 29, 33, 29, 29, 31, 35, 31, 37, 43, 35, 33, 37, 33, 35, 33, 41, 47, 35
Offset: 1

Views

Author

Wolfdieter Lang, Feb 12 2015

Keywords

Comments

For the corresponding term y1(n) see A254765(n).
For the positive fundamental proper (sometimes called primitive) solutions x2(n) and y2(n) of the second class of this (generalized) Pell equation see A254766(n) and A254929(n).
The present solutions of the first class are the smallest positive ones.
See the Nagell reference Theorem 111 p. 210 for the proof of the existence of solutions (the discriminant of this binary quadratic form is +8 hence it is an indefinite form with an infinitude of solutions if there exists at least one).
See the Nagell reference Theorem 110, p. 208 for the proof that there are only two classes of solutions for this Pell equation, because the equation is solvable, and the primes A007522(n) do not divide 4.
The present fundamental solutions are found according to the Nagell reference Theorem 108, p. 205, adapted to the case at hand, by scanning the following two inequalities for solutions x1(n) = 2*X1(n) + 1 and y1(n) = 2*Y1(n) + 1. The intervals for X1(n) and Y1(n) to be scanned are ceiling((sqrt(2+p(n))-1)/2) <= X1(n) <= floor(sqrt((2*p(n))-1)/2), with p(n) = A007522(n) and 0 <= Y1(n) <= floor((sqrt(p(n)/2)-1)/2).
The general positive proper solutions for both classes are obtained by applying positive powers of the matrix M = [[3,4],[2,3]] on the fundamental column vectors (x(n),y(m))^T.
The least positive x solutions (that is the ones of the first class) for the primes +1 and -1 (mod 8) together (including also prime 2) are given in A002334.

Examples

			The first pairs [x1(n), y1(n)] of the fundamental positive solutions of this first class are (we list the prime A007522(n) as first entry):
  [7, [3, 1]], [23, [5, 1]], [31, [7, 3]], [47, [7, 1]], [71, [11, 5]], [79, [9, 1]], [103, [11, 3]], [127, [15, 7]], [151, [13, 3]], [167, [13, 1]], [191, [17, 7]], [199, [19, 9]], [223, [15, 1]], ...
a(3)^2 - 2*A254765(3)^2 = 7^2 - 2*3^2 = 31 = A007522(3).
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

Formula

a(n)^2 - 2*A254765(n)^2 = A007522(n) gives the smallest positive (proper) solution of this (generalized) Pell equation.

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.

A254931 Fundamental positive solution y = y2(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

3, 4, 7, 5, 8, 11, 7, 12, 15, 10, 8, 13, 16, 9, 14, 17, 23, 13, 18, 11, 27, 14, 19, 12, 22, 17, 25, 28, 23, 18, 14, 32, 35, 19, 17, 22, 30, 25, 36, 39, 16, 28, 23, 31, 21, 19, 40, 20, 18, 38
Offset: 1

Views

Author

Wolfdieter Lang, Feb 12 2015

Keywords

Comments

The corresponding terms x = x2(n) are given in A254930(n).
The y2-sequence for the second class for the primes congruent to 1 (mod 8), which are given in A007519, is 2*A254763. For the primes congruent to 7 (mod 8), given in A007522, the y2-sequence is A254929.
For comments and the Nagell reference see A254760.

Examples

			a(4) = 2*7 - 3*3 = 5.
A254930(4)^2 - 2*a(4)^2 = 9^2 - 2*5^2 = 31 = A001132(4) = A007522(3).
See A254930 for the first pairs (x2(n), y2(n)).
		

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]}; y2 = xy[[-1, 2]] // Simplify; Print[y2]; Sow[y2]]]]][[2, 1]] (* Jean-François Alcover, Oct 28 2019 *)

Formula

A254930(n)^2 - 2*a(n)^2 = A001132(n), and a(n) is the second largest (proper) positive integer satisfying this (generalized) Pell equation.
a(n) = 2*A002334(n+1) - 3*A002335(n+1), n >= 1.
Showing 1-6 of 6 results.