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-4 of 4 results.

A077232 a(n) is smallest natural number satisfying Pell equation a^2 - d(n)*b^2= +1 or = -1, with d(n)=A000037(n) (a nonsquare). Corresponding smallest b(n)=A077233(n).

Original entry on oeis.org

1, 2, 2, 5, 8, 3, 3, 10, 7, 18, 15, 4, 4, 17, 170, 9, 55, 197, 24, 5, 5, 26, 127, 70, 11, 1520, 17, 23, 35, 6, 6, 37, 25, 19, 32, 13, 3482, 199, 161, 24335, 48, 7, 7, 50, 649, 182, 485, 89, 15, 151, 99, 530, 31, 29718, 63, 8, 8, 65, 48842, 33, 7775, 251, 3480, 17, 1068, 43, 26, 57799, 351, 53, 80, 9, 9, 82, 55, 378, 10405, 28, 197, 500, 19, 1574, 1151, 12151, 2143295, 39, 49, 5604, 99, 10, 10, 101, 227528
Offset: 1

Views

Author

Wolfdieter Lang, Nov 08 2002

Keywords

Comments

If d(n)=A000037(n) is from A003654 (that is if the regular continued fraction for sqrt(d(n)) has odd (primitive) period length) then the -1 option applies. For such d(n) the minimal a(n) and b(n) numbers for the +1 option are 2*a(n)^2+1 and 2*a(n)*b(n), respectively (see Perron I, pp. 94,95).
If d(n)=A000037(n)= k^2+1, k=1,2,.., then the a^2 - d(n)*b^2 = -1 Pell equation has the minimal solution a(n)=k and b(n)=1. If d(n)=A000037(n)= k^2-1, k=2,3,..., then the a^2 - d(n)*b^2 = +1 Pell equation has the minimal solution a=k and b=1.
The general integer solutions (up to signs) of Pell equation a^2 - d(n)*b^2 = +1 with d(n)=A000037(n), but not from A003654, are a(n,p)= T(p+1,a(n)) and b(n,p)= b(n)*S(p,2*a(n)), p=0,1,... If d(n)=A000037(n) is also from A003654 then these solutions are a(n,p)= T(p+1,2*a(n)^2+1) and b(n,p)= 2*a(n)*b(n)*S(p,2*(2*a(n)^2+1)), p=0,1,... Here T(n,x), resp. S(n,x) := U(n,x/2), are Chebyshev's polynomials of the first, resp. second, kind. See A053120 and A049310.
The general integer solutions (up to signs) of the Pell equation a^2 - d(n)*b^2 = -1 with d(n)=A000037(n)= A003654(k), for some k>=1, are a(n,p) = a(n)*(S(n,2*(2*a(n)^2)+1) + S(n-1,2*(2*a(n)^2)+1)) and b(n,p) = b(n)*(S(n,2*(2*a(n)^2)+1) - S(n-1,2*(2*a(n)^2)+1)) with the S(n,x) := U(n,x/2) Chebyshev polynomials. S(-1,x) := 0.
If the trivial solution x=1, y=0 is included, the sequence becomes A006702. - T. D. Noe, May 17 2007

Examples

			d=10=A000037(7)=A003654(3), therefore a(7)^2=10*b(7)^2 -1, i.e. 3^2=10*1^2 -1 and 2*a(7)^2+1=19 and 2*a(7)*b(7)=2*3*1=6 satisfy 19^2 - 10*6^2 = +1.
d=11=A000037(8) is not in A003654, therefore there is no (nontrivial) solution of the a^2 - d*b^2 = -1 Pell equation and a(8)=10 and b(8)=A077233(8)=3 satisfy 10^2 - 11*3^2 = +1.
10=d(7)=A000037(7)=A003654(3)=3^2+1 hence a(7)=3 and b(7)=1 are the smallest numbers satisfying a^2-10*b^2=-1.
8=d(6)=A000037(6)=3^2-1 (not in A003654) hence a(6)=3 and b(6)=1 are the smallest numbers satisfying a^2-8*b^2=+1.
		

References

  • T. Nagell, "Introduction to Number Theory", Chelsea Pub., New York, 1964, table p. 301.
  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 26, p. 91 with explanation on pp. 94,95).

Crossrefs

Programs

  • Mathematica
    nmax = 500;
    nconv = 200; (* The number of convergents 'nconv' should be increased if the linear recurrence is not found for some terms. *)
    nonSquare[n_] := n + Round[Sqrt[n]];
    a[n_] := a[n] = Module[{lr}, lr = FindLinearRecurrence[ Numerator[ Convergents[ Sqrt[nonSquare[n]], nconv]]]; (1/2) SelectFirst[lr, #>1&]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, nmax}] (* Jean-François Alcover, Mar 10 2021 *)

Formula

a(n)=sqrt(A000037(n)*A077233(n)^2 + (-1)^(c(n))) with c(n)=1 if A000037(n)=A003654(k) for some k>=1 else c(n)=0.

A033313 Smallest positive integer x satisfying the Pell equation x^2 - D*y^2 = 1 for nonsquare D and positive y.

Original entry on oeis.org

3, 2, 9, 5, 8, 3, 19, 10, 7, 649, 15, 4, 33, 17, 170, 9, 55, 197, 24, 5, 51, 26, 127, 9801, 11, 1520, 17, 23, 35, 6, 73, 37, 25, 19, 2049, 13, 3482, 199, 161, 24335, 48, 7, 99, 50, 649, 66249, 485, 89, 15, 151, 19603, 530, 31, 1766319049, 63, 8, 129, 65, 48842, 33
Offset: 1

Views

Author

Keywords

Crossrefs

See A033317 (for y's).

Programs

  • Maple
    F:= proc(d) local r,Q; uses numtheory;
      Q:= cfrac(sqrt(d),'periodic','quotients'):
      r:= nops(Q[2]);
      if r::odd then
        numer(cfrac([op(Q[1]),op(Q[2]),op(Q[2][1..-2])]))
      else
        numer(cfrac([op(Q[1]),op(Q[2][1..-2])]));
      fi
    end proc:
    map(F, remove(issqr,[$1..100])); # Robert Israel, May 17 2015
  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2n]; s = FromContinuedFraction[ContinuedFraction[Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    A033313 = DeleteCases[PellSolve /@ Range[100], {}][[All, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002350 *)
    Table[If[! IntegerQ[Sqrt[k]], {k,FindInstance[x^2 - k*y^2 == 1 && x > 0 && y > 0, {x, y},Integers]}, Nothing], {k, 2, 80}][[All, 2, 1, 1, 2]] (* Horst H. Manninger, Mar 28 2021 *)

Formula

a(n) = sqrt(1 + A000037(n)*A033317(n)^2), or
a(n) = sqrt(1 + (n + floor(1/2 + sqrt(n)))*A033317(n)^2). - Zak Seidov, Oct 24 2013

Extensions

Offset switched to 1 by R. J. Mathar, Sep 21 2009
Name corrected by Wolfdieter Lang, Sep 03 2015

A033317 Smallest positive integer y satisfying the Pell equation x^2 - D*y^2 = 1 for nonsquare D.

Original entry on oeis.org

2, 1, 4, 2, 3, 1, 6, 3, 2, 180, 4, 1, 8, 4, 39, 2, 12, 42, 5, 1, 10, 5, 24, 1820, 2, 273, 3, 4, 6, 1, 12, 6, 4, 3, 320, 2, 531, 30, 24, 3588, 7, 1, 14, 7, 90, 9100, 66, 12, 2, 20, 2574, 69, 4, 226153980, 8, 1, 16, 8, 5967, 4, 936, 30, 413, 2, 267000, 430, 3, 6630, 40, 6, 9
Offset: 1

Views

Author

Keywords

Comments

D = D(n) = A000037(n). - Wolfdieter Lang, Oct 04 2015

Crossrefs

Cf. A000037, A033313 (for the x's), A077232, A077233.

Programs

  • Maple
    F:= proc(d) local r,Q; uses numtheory;
      Q:= cfrac(sqrt(d),'periodic','quotients'):
      r:= nops(Q[2]);
      if r::odd then
        denom(cfrac([op(Q[1]),op(Q[2]),op(Q[2][1..-2])]))
      else
        denom(cfrac([op(Q[1]),op(Q[2][1..-2])]));
      fi
    end proc:
    map(F, remove(issqr,[$1..100])); # Robert Israel, May 17 2015
  • Mathematica
    PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2n]; s = FromContinuedFraction[ContinuedFraction[Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    A033317 = DeleteCases[PellSolve /@ Range[100], {}][[All, 2]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002349 *)

Formula

a(n) = sqrt((A033313(n)^2 - 1)/A000037(n)). - Jinyuan Wang, Jul 09 2020

A006703 Solution to Pellian: y such that x^2 - n*y^2 = +-1.

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 3, 1, 0, 1, 3, 2, 5, 4, 1, 0, 1, 4, 39, 2, 12, 42, 5, 1, 0, 1, 5, 24, 13, 2, 273, 3, 4, 6, 1, 0, 1, 6, 4, 3, 5, 2, 531, 30, 24, 3588, 7, 1, 0, 1, 7, 90, 25, 66, 12, 2, 20, 13, 69, 4, 3805, 8, 1, 0, 1, 8, 5967, 4, 936, 30, 413, 2, 125, 5, 3, 6630, 40, 6, 9
Offset: 1

Views

Author

Keywords

References

  • A. Cayley, Report of a committee appointed for the purpose of carrying on the tables connected with the Pellian equation ..., Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 13, pp. 430-443.
  • C. F. Degen, Canon Pellianus. Hafniae, Copenhagen, 1817.
  • 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 and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006702 (for the x values), A077233.

Programs

  • Mathematica
    r[x_, n_] := Reduce[ y > 0 && (x^2 - n*y^2 == -1 || x^2 - n*y^2 == 1 ), y, Integers]; a[n_ /; IntegerQ[ Sqrt[n]]] = 0; a[n_] := a[n] = (k = 1; While[r[k, n] === False, k++]; y /. ToRules[r[k, n]]); Table[ Print[ a[n] ]; a[n], {n, 1, 79}] (* Jean-François Alcover, Jan 30 2012 *)
    nmax = 500;
    nconv = 200; (* The number of convergents'nconv' should be increased if the linear recurrence is not found for some terms. *)
    x[n_] := x[n] = Module[{lr}, If[IntegerQ[Sqrt[n]], 1, lr = FindLinearRecurrence[ Numerator[ Convergents[Sqrt[n], nconv]]]; SelectFirst[lr, # > 1 &]/2]];
    a[n_] := If[n == 2, 1, SelectFirst[{Sqrt[(x[n]^2 - 1)/n], Sqrt[(x[n]^2 + 1)/n]}, IntegerQ]];
    Array[a, nmax] // Quiet (* Jean-François Alcover, Mar 08 2021 *)

Extensions

Corrected and extended by T. D. Noe, May 19 2007
Showing 1-4 of 4 results.