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.

A094048 Let p(n) be the n-th prime congruent to 1 mod 4. Then a(n) = the least m for which m^2+1=p(n)*k^2 has a solution.

Original entry on oeis.org

2, 18, 4, 70, 6, 32, 182, 29718, 1068, 500, 5604, 10, 8890182, 776, 1744, 113582, 4832118, 1118, 1111225770, 1764132, 14, 1710, 23156, 71011068, 16, 82, 8920484118, 1063532, 2482, 126862368, 352618
Offset: 1

Views

Author

Matthijs Coster, Apr 29 2004

Keywords

Comments

Subsequence of A191860. [Reinhard Zumkeller, Jun 18 2011]

Crossrefs

Cf. A002144, A094049 (associated k), A130226, A137351, A179073.

Programs

  • Haskell
    a094048 n = head [m | m <- map (a037213 . subtract 1 . (* a002144 n))
                                   (tail a000290_list), m > 0]
    -- Reinhard Zumkeller, Jun 13 2015
  • Mathematica
    f[n_] := Block[{y = 1}, While[ !IntegerQ[ Sqrt[n*y^2 - 1]], y++ ]; Sqrt[n*y^2 - 1]]; lst = {}; Do[p = Prime@ n; If[ Mod[p, 4] == 1, AppendTo[lst, f@p]; Print[{n, Prime@n, f@p}]], {n, 66}]; lst

Extensions

Edited by Don Reble, Apr 30 2004

A228077 Determinant of the (p_n-1)/2 X (p_n-1)/2 matrix with (i,j)-entry being the Legendre symbol ((j-i)/p_n), where p_n is the n-th prime.

Original entry on oeis.org

0, -1, 0, 0, -5, 1, 0, 0, -13, 0, -145, 5, 0, 0, -25, 0, -3805, 0, 0, 125, 0, 0, 53, 569, -401, 0, 0, -851525, 73, 0, 0, 149, 0, -9305, 0, -385645, 0, 0, -85, 0, -82596761, 0, 126985, -785, 0, 0, 0, 0, -1321693313, 1517, 0, 4574225, 0, 1025, 0, -134485, 0, -535979945, 63445, 0, -145, 0, 0, 7170685, -19805, 0, 55335641, 0, -167273125693, 3793, 0, 0, -27765559705, 0, 0, -427316305, -1027776565, 2564801, 5534176685
Offset: 2

Views

Author

Zhi-Wei Sun, Aug 09 2013

Keywords

Comments

Conjecture: In the case p_n == 1 (mod 4), (2/p_n)*a(n) is a positive odd integer whose prime factors are all congruent to 1 modulo 4, and moreover for some integer b(n) we have b(n) + (2/p_n)*a(n)*sqrt(p_n) = e(p_n)^{(2-(2/p_n))h(p_n)}, where e(p_n) and h(p_n) are the fundamental unit and the class number of the real quadratic field Q(sqrt(p_n)) respectively.
Note that a(n) = 0 when p_n == 3 (mod 4), this is because the transpose of the determinant a(n) coincides with (-1/p_n)^{(p_n-1)/2}*a(n) = -a(n).
M. Vsemirnov has proved Robin Chapman's conjecture on the evaluation of the determinant of the (p+1)/2-by-(p+1)/2 matrix with (i,j)-entry (i,j = 0,...,(p-1)/2) being the Legendre symbol ((j-i)/p), where p is an odd prime.
On Aug 14 2013, Robin Chapman informed the author that he first made the conjecture about the exact value of a(n) in a private manuscript dated Aug 05 2003.

Examples

			a(2) = 0 since the Legendre symbol ((1-1)/3) is zero.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Det[Table[JacobiSymbol[j-i,Prime[n]],{i,1,(Prime[n]-1)/2},{j,1,(Prime[n]-1)/2}]]
    Table[a[n],{n,2,20}]
  • PARI
    a(n) = my(p=prime(n)); matdet(matrix((p-1)/2, (p-1)/2, i, j, i--; j--; kronecker(i-j, p))); \\ Michel Marcus, Aug 25 2021

A306529 x-value of the smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4), p = A002145(n).

Original entry on oeis.org

1, 3, 3, 13, 5, 39, 59, 7, 23, 221, 59, 9, 9, 477, 31, 2175, 103, 8807, 41571, 8005, 13, 2047, 2999, 127539, 527593, 15, 15, 2489, 1917, 373, 340551, 11759, 9409, 4109, 52778687, 801, 19, 137913, 113759383, 137, 16437, 12311, 21, 21, 15732537, 1275, 1729, 7204587, 305987, 67
Offset: 1

Views

Author

Jianing Song, Mar 25 2019

Keywords

Comments

a(n) exists for all n.
X = a(n)^2 - (-1)^((p+1)/4), Y = a(n)*A306566(n) gives the smallest solution to x^2 - p*y^2 = 1, p = A002145(n). As a result, all the positive solutions to x^2 - p*y^2 = 2*(-1)^((p+1)/4) are given by (x_n, y_n) where x_n + (y_n)*sqrt(p) = (a(n) + A306566(n)*sqrt(p))*(X + Y*sqrt(p))^n.

Examples

			The smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4) for the first primes congruent to 3 modulo 4:
  n |      Equation     | x_min | y_min
  1 | x^2 -  3*y^2 = -2 |     1 |     1
  2 | x^2 -  7*y^2 = +2 |     3 |     1
  3 | x^2 - 11*y^2 = -2 |     3 |     1
  4 | x^2 - 19*y^2 = -2 |    13 |     3
  5 | x^2 - 23*y^2 = +2 |     5 |     1
  6 | x^2 - 31*y^2 = +2 |    39 |     7
  7 | x^2 - 43*y^2 = -2 |    59 |     9
  8 | x^2 - 47*y^2 = +2 |     7 |     1
  9 | x^2 - 59*y^2 = -2 |    23 |     3
		

Crossrefs

Cf. A002145, A306566 (y-values).
Similar sequences: A094048, A094049 (x^2 - A002144(n)*y^2 = -1); A306618, A306619 (2*x^2 - A002145(n)*y^2 = (-1)^((p+1)/4)).

Programs

  • PARI
    b(p) = if(isprime(p)&&p%4==3, x=1; while(!issquare((x^2 - 2*(-1)^((p+1)/4))/p), x++); x)
    forprime(p=3, 500, if(p%4==3, print1(b(p), ", ")))

Formula

If the continued fraction of sqrt(A002145(n)) is [a_0; {a_1, a_2, ..., a_(k-1), a_k, a_(k-1), ..., a_1, 2*a_0}], where {} is the periodic part, let x/y = [a_0; a_1, a_2, ..., a_(k-1)], gcd(x, y) = 1, then a(n) = x and A306566(n) = y.

A306566 y-value of the smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4), p = A002145(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 7, 9, 1, 3, 27, 7, 1, 1, 47, 3, 193, 9, 747, 3383, 627, 1, 153, 217, 9041, 36321, 1, 1, 161, 121, 23, 20687, 699, 537, 233, 2900979, 43, 1, 7199, 5843427, 7, 803, 593, 1, 1, 731153, 59, 79, 326471, 13809, 3, 7, 12507, 541137, 11, 563210019
Offset: 1

Views

Author

Jianing Song, Mar 25 2019

Keywords

Comments

a(n) exists for all n.
X = A306529(n)^2 - (-1)^((p+1)/4), Y = A306529(n)*a(n) gives the smallest solution to x^2 - p*y^2 = 1, p = A002145(n). As a result, all the positive solutions to x^2 - p*y^2 = 2*(-1)^((p+1)/4) are given by (x_n, y_n) where x_n + (y_n)*sqrt(p) = (A306529(n) + a(n)*sqrt(p))*(X + Y*sqrt(p))^n.

Examples

			The smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4) for the first primes congruent to 3 modulo 4:
  n |      Equation     | x_min | y_min
  1 | x^2 -  3*y^2 = -2 |     1 |     1
  2 | x^2 -  7*y^2 = +2 |     3 |     1
  3 | x^2 - 11*y^2 = -2 |     3 |     1
  4 | x^2 - 19*y^2 = -2 |    13 |     3
  5 | x^2 - 23*y^2 = +2 |     5 |     1
  6 | x^2 - 31*y^2 = +2 |    39 |     7
  7 | x^2 - 43*y^2 = -2 |    59 |     9
  8 | x^2 - 47*y^2 = +2 |     7 |     1
  9 | x^2 - 59*y^2 = -2 |    23 |     3
		

Crossrefs

Cf. A002145, A306529 (x-values).
Similar sequences: A094048, A094049 (x^2 - A002144(n)*y^2 = -1); A306618, A306619 (2*x^2 - A002145(n)*y^2 = (-1)^((p+1)/4)).

Programs

  • PARI
    b(p) = if(isprime(p)&&p%4==3, y=1; while(!issquare(p*y^2 + 2*(-1)^((p+1)/4)), y++); y)
    forprime(p=3, 500, if(p%4==3, print1(b(p), ", ")))

Formula

If the continued fraction of sqrt(A002145(n)) is [a_0; {a_1, a_2, ..., a_(k-1), a_k, a_(k-1), ..., a_1, 2*a_0}], where {} is the periodic part, let x/y = [a_0; a_1, a_2, ..., a_(k-1)], gcd(x, y) = 1, then A306529(n) = x and a(n) = y.

A306618 x-value of the smallest solution to 2*x^2 - p*y^2 = (-1)^((p+1)/4), p = A002145(n).

Original entry on oeis.org

1, 2, 7, 3, 78, 4, 51, 732, 277, 191, 6, 44, 20621, 122, 416941, 8, 5123, 25, 1034, 9, 3993882, 210107, 203100, 10, 1325, 5248, 65030839, 20107956, 30953, 4584105462, 1036, 4889, 295081, 58746, 20725, 98465863939, 1494439626, 1612, 10173, 6040149252, 102607, 9460742124
Offset: 1

Views

Author

Jianing Song, Mar 25 2019

Keywords

Comments

a(n) exists for all n.
X = 4*a(n)^2 - (-1)^((p+1)/4), Y = 2*a(n)*A306619(n) gives the smallest solution to x^2 - 2p*y^2 = 1, p = A002145(n).

Examples

			The smallest solution to 2*x^2 - p*y^2 = (-1)^((p+1)/4) for the first primes congruent to 3 modulo 4:
  n |       Equation      | x_min | y_min
  1 | 2*x^2 -  3*y^2 = -1 |     1 |     1
  2 | 2*x^2 -  7*y^2 = +1 |     2 |     1
  3 | 2*x^2 - 11*y^2 = -1 |     7 |     3
  4 | 2*x^2 - 19*y^2 = -1 |     3 |     1
  5 | 2*x^2 - 23*y^2 = +1 |    78 |    23
  6 | 2*x^2 - 31*y^2 = +1 |     4 |     1
  7 | 2*x^2 - 43*y^2 = -1 |    51 |    11
  8 | 2*x^2 - 47*y^2 = +1 |   732 |   151
  9 | 2*x^2 - 59*y^2 = -1 |   277 |    51
		

Crossrefs

Cf. A002145, A306619 (y-values).
Similar sequences: A094048, A094049 (x^2 - A002144(n)*y^2 = -1); A306529, A306566 (x^2 - A002145(n)*y^2 = 2*(-1)^((p+1)/4)).

Programs

  • PARI
    b(p) = if(isprime(p)&&p%4==3, x=1; while(!issquare((2*x^2 - (-1)^((p+1)/4))/p), x++); x)
    forprime(p=3, 250, if(p%4==3, print1(b(p), ", ")))

Formula

If the continued fraction of sqrt(2*A002145(n)) is [a_0; {a_1, a_2, ..., a_(k-1), a_k, a_(k-1), ..., a_1, 2*a_0}], where {} is the periodic part, let x/y = [a_0; a_1, a_2, ..., a_(k-1)], gcd(x, y) = 1, then a(n) = x/2 and A306619(n) = y.

A306619 y-value of the smallest solution to 2*x^2 - p*y^2 = (-1)^((p+1)/4), p = A002145(n).

Original entry on oeis.org

1, 1, 3, 1, 23, 1, 11, 151, 51, 33, 1, 7, 3201, 17, 57003, 1, 633, 3, 119, 1, 437071, 22209, 20783, 1, 129, 497, 6104097, 1839433, 399752993, 89, 411, 23817, 4711, 1611, 7475426163, 111543983, 119, 739, 436478927, 7089, 644468311, 103, 93487270491, 573497, 57, 4182991
Offset: 1

Views

Author

Jianing Song, Mar 25 2019

Keywords

Comments

a(n) exists for all n.
X = 4*A306618(n)^2 - (-1)^((p+1)/4), Y = 2*A306618(n)*a(n) gives the smallest solution to x^2 - 2p*y^2 = 1, p = A002145(n).

Examples

			The smallest solution to 2*x^2 - p*y^2 = (-1)^((p+1)/4) for the first primes congruent to 3 modulo 4:
  n |       Equation      | x_min | y_min
  1 | 2*x^2 -  3*y^2 = -1 |     1 |     1
  2 | 2*x^2 -  7*y^2 = +1 |     2 |     1
  3 | 2*x^2 - 11*y^2 = -1 |     7 |     3
  4 | 2*x^2 - 19*y^2 = -1 |     3 |     1
  5 | 2*x^2 - 23*y^2 = +1 |    78 |    23
  6 | 2*x^2 - 31*y^2 = +1 |     4 |     1
  7 | 2*x^2 - 43*y^2 = -1 |    51 |    11
  8 | 2*x^2 - 47*y^2 = +1 |   732 |   151
  9 | 2*x^2 - 59*y^2 = -1 |   277 |    51
		

Crossrefs

Cf. A002145, A306618 (x-values).
Similar sequences: A094048, A094049 (x^2 - A002144(n)*y^2 = -1); A306529, A306566 (x^2 - A002145(n)*y^2 = 2*(-1)^((p+1)/4)).

Programs

  • PARI
    b(p) = if(isprime(p)&&p%4==3, y=1; while(!issquare((p*y^2 + (-1)^((p+1)/4))/2), y++); y)
    forprime(p=3, 250, if(p%4==3, print1(b(p), ", ")))

Formula

If the continued fraction of sqrt(2*A002145(n)) is [a_0; {a_1, a_2, ..., a_(k-1), a_k, a_(k-1), ..., a_1, 2*a_0}], where {} is the periodic part, let x/y = [a_0; a_1, a_2, ..., a_(k-1)], gcd(x, y) = 1, then A306618(n) = x/2 and a(n) = y.
Showing 1-6 of 6 results.