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.

Previous Showing 11-17 of 17 results.

A033319 Incrementally largest values of minimal y satisfying Pell equation x^2-Dy^2=1.

Original entry on oeis.org

0, 2, 4, 6, 180, 1820, 3588, 9100, 226153980, 15140424455100, 183567298683461940, 9562401173878027020, 42094239791738433660, 1238789998647218582160, 189073995951839020880499780706260
Offset: 1

Views

Author

Keywords

Comments

Records in A033317 (or A002349).

Crossrefs

Programs

  • 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 = 2 n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
    yy = DeleteCases[PellSolve /@ Range[10^5], {}][[All, 2]];
    Reap[Module[{y, record = 0}, Sow[0]; For[i = 1, i <= Length@yy, i++, y = yy[[i]]; If[y > record, record = y; Sow[y]]]]][[2, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002350 *)

A262024 Positive fundamental solution x0 corresponding to the even y0 = 2*A261250 of the Pell equation x^2 - D y^2 = +1.

Original entry on oeis.org

3, 9, 5, 19, 7, 649, 15, 33, 17, 9, 55, 197, 51, 127, 9801, 11, 23, 35, 73, 37, 25, 2049, 13, 199, 161, 24335, 99, 649, 66249, 485, 89, 15, 151, 19603, 31, 1766319049, 63, 129, 65, 33, 7775, 251, 17, 2281249, 3699, 57799, 351, 53, 163, 55, 285769, 10405, 500001, 19, 1151, 12151, 2143295, 39, 62809633, 99, 201, 101, 41, 32080051, 1351, 158070671986249, 21, 295, 127, 1204353, 1025, 9801, 649, 306917
Offset: 1

Views

Author

Wolfdieter Lang, Sep 16 2015

Keywords

Comments

This is a proper subset of A033313 corresponding to the even members of A033317.
The D values coincide apparently with A007969 (Conway's rectangular numbers).
For a proof of this coincidence see the W. Lang link under A007969. - Wolfdieter Lang, Oct 04 2015

Examples

			See A261250.
		

Crossrefs

A267857 Length of the period of the continued fraction for the square root of D, the discriminant of indefinite binary quadratic forms. D is given in A079896.

Original entry on oeis.org

1, 2, 2, 5, 1, 2, 6, 2, 4, 5, 4, 4, 1, 2, 3, 8, 6, 2, 6, 5, 2, 6, 4, 11, 1, 2, 8, 2, 7, 12, 6, 2, 2, 5, 6, 5, 8, 10, 4, 11, 1, 2, 2, 8, 15, 6, 9, 10, 6, 2, 16, 5, 4, 10, 2, 16, 4, 9, 4, 4, 1, 2, 9, 2, 8, 2, 17, 8, 10, 6, 6, 2, 16, 5, 4, 8, 4, 21
Offset: 1

Views

Author

Wolfdieter Lang, Feb 03 2016

Keywords

Comments

This is a subsequence of A003285.
If a(n) is even then the smallest positive integer solution of the Pell equation x^2 - D(n)*y^2 = +1 with D(n) = A079896(n) is given by (x0, y0) = (P,Q) with P/Q = [a,b[1], ..., b[a(n)-1]]. If a(n) is odd then the smallest positive integer solution of the Pell equation x^2 - D(n)*y^2 = +1 is given by (x0, y0) = (P^2 + D(n)*Q^2, 2*P*Q). See e.g., the Silverman reference Theorem 40.4 on p. 351.
For positive integer d, d not a square, the Pell equations X^2 - d*Y^2 = +4 and X^2 - d*Y^2 = -4 have no proper solutions. For D(n) = A079896(n) there are solutions for X^2 - D(n)*Y^2 = +4 or -4 (inclusive or). See the Wolfdieter Lang link under A225953 for Pell +4 or -4 solutions.

Examples

			a(1)  = 1  because sqrt(5)  = [2,repeat(4)].
a(2)  = 2  because sqrt(8)  = [2,repeat(1,4)].
a(24) = 11 because sqrt(61) = [7,repeat(1,4,3,1,2,2,1,3,4,1,14)].
Pell +1 equation: n = 24 with D = 61 has odd a(24)
  P/Q = [7,1,4,3,1,2,2,1,3,4,1] = 29718/3805 (in lowest terms). Therefore (x0, y0) = (1766319049, 226153980), see A174762 (Of course, (1, 0) is the smallest nonnegative solution.)
		

References

  • J. H. Silverman, A Friendly Introduction to Number Theory, 3rd ed., Pearson Education, Inc, 2006, p. 351.

Crossrefs

Programs

Extensions

Offset corrected by Robin Visser, Jun 06 2025

A225946 Nonsquare k such that the minimal (in y) solution 0 < y < x of x^2 - k*y^2 = 1 has x-y square.

Original entry on oeis.org

2, 3, 17, 24, 30, 40, 44, 84, 87, 99, 130, 182, 260, 288, 442, 448, 635, 650, 672, 675, 888, 894, 1211, 1299, 1368, 1605, 1616, 1722, 1748, 1955, 2034, 2499, 2541, 3150, 3287, 3782, 4224, 4400, 4920, 5073, 5619, 6723, 7242, 7310, 8487, 9228, 10200, 11055
Offset: 1

Views

Author

Irina Gerasimova, May 21 2013

Keywords

Comments

Numbers n such that A002350(n) - A002349(n) is a nonzero square. - Charles R Greathouse IV, Jun 06 2013

Examples

			3^2 - 2*2^2 = 1 and 3 - 2 = 1 (square), so a(1) = 2;
2^2 - 3*1^2 = 1 and 2 - 1 = 1 (square), so a(2) = 3;
33^2 - 17*8^2 = 25 and 33 - 8 = 25 (square), so a(3) = 17.
		

Crossrefs

Programs

  • Mathematica
    qQ[n_] := IntegerQ@Sqrt@n; Select[Range[500], ! qQ[#] && qQ[(x - y) /. ToRules[Expand[ Reduce[x^2 - #*y^2 == 1 && x>0 && y>0, {x,y}, Integers] /. C[1] -> 1]]] &] (* Giovanni Resta, May 25 2013 *)
  • PARI
    is(n)=if(issquare(n),return(0));my(cf=contfrac(sqrt(n)),t,N,D);for(i=1,#cf-1,t=cf[i+1];forstep(j=i,1,-1,t=cf[j]+1/t);N=numerator(t);D=denominator(t);if(N^2-n*D^2==1,return(issquare(N-D)))); warning("Insufficient precision for "n) \\ Charles R Greathouse IV, Jun 06 2013

Extensions

a(15)-a(47) from Giovanni Resta, May 25 2013

A237704 Numbers n for which the fundamental solution of Pell's equation x^2 - n*y^2 = 1 has both x and y prime.

Original entry on oeis.org

2, 6, 12, 30, 32, 40, 42, 72, 90, 132, 152, 192, 210, 240, 312, 342, 408, 420, 462, 480, 552, 560, 592, 672, 702, 792, 870, 880, 888, 912, 930, 1122, 1152, 1260, 1272, 1320, 1332, 1560, 1584, 1722, 1752, 1792, 1980, 2352, 2520, 2550, 2652, 2712, 2862, 2952, 2970, 3192, 3560, 3640, 4032
Offset: 1

Views

Author

Jani Melik, Feb 11 2014

Keywords

Examples

			Pell's equation x^2 - 2*y^2 = 1 and its fundamental solution is (x,y) = (3,2) which are both primes, so a(1) = 2.
(x,y) = (5,2) satisfies x^2 - 6*y^2 = 1, so a(2) = 6.
(x,y) = (7,2) satisfies x^2 - 12*y^2 = 1, so a(3) = 12.
Pell's equation x^2 - 2088*y^2 = 1 and (x,y) = (19603, 429), 19603 is prime, 429 = 3 * 11 * 13 is not, so 2088 is not included.
Pell's equation x^2 - 2000*y^2 = 1 and (x,y) = (930249, 20801), 930249 = 3^2 * 41 * 2521 and 20801 = 11 * 31 * 61 are not primes, so 2000 is not included.
		

Crossrefs

Extensions

420 inserted into the sequence by Colin Barker, Feb 12 2014

A261249 Number of classes of proper solutions of the Pell equation x^2 - D(n) y^2 = +4 for D(n) = A079896(n), n >= 1.

Original entry on oeis.org

2, 0, 1, 2, 0, 0, 2, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Wolfdieter Lang, Sep 16 2015

Keywords

Comments

See the W. Lang link on A225953, Table 2. References will also be found there. For the present class number see especially Theorem 109 pp. 207-208 of the Nagell reference.
These class numbers should not be confused with the class numbers of indefinite binary quadratic forms of discriminant D(n), which are given in A087048(n).
If a(n) = 2 then the proper positive fundamental solution for the second class [x2(n), y2(n)] is obtained from the solution of the first class [x1(n), y1(n)] (shown in the mentioned Table 2 under Pell(X, Y)) by application of the matrix M(n) = [[x0(n), D(n)*y0(n)], [y0(n), x0(n)]] on (x1(n), -y1(n))^T (T for transposed), where x0(n) and y0(n) is the positive (proper) fundamental solution of x^2 - D(n)*y^2 = +1 found under A033313 and A033317 for the appropriate D from A000037. Application of positive powers of M(n) to the proper positive fundamental solution of each class produces all positive solutions.
If a(n) = 1 the class is called ambiguous (see Nagell, p. 205). In this case the proper positive fundamental solution [x1(n), y1(n)] = [x(n), y(n)] and the negative one [x1(n), -y1(n)] belong to the same class.
For every D(n) = A079896(n) there is the improper positive fundamental solution [2*x0(n), 2*y0(n)].
Conjecture: For even D(n), i.e., D from 4*A000037, and a(n) = 0 one finds for r(n) = D(n)/4 coincidence with Conway's so-called rectangular numbers A007969. The first D values are 8, 20, 24, 40, 48, 52, 56, 68, 72, 80, ... This is equivalent to the conjecture that X^2 - r*y^2 = +1 has an even fundamental positive solution y = y0 precisely for the numbers A007969 (because x has to be even, x = 2*X, and whenever y0 is even all y solutions are even). See A261250 and A262024 for the y0 and x0 values, respectively.

Examples

			n=1: D(1) = 5 = A000037(3) with the a(1) = 2 proper positive fundamental solutions [x, y] = [3, 1] and [7, 3] for the two classes.
  [x0(1), y0(1)] = [A033313(3), A033317(3)] = [9, 4], and (7, 3)^T = [[9, 4*5], [4, 9]] (3, -1)^T.
  All other positive solutions in each of the two classes are obtained by applying positive powers of this matrix M(5) to the fundamental solutions.
  The improper positive fundamental solution is [2*9, 2*4] = [18, 8].
n=2: D(2) = 8 = A000037(6) has a(2) = 0, hence there are only the improper solutions obtainable from [2*3, 2*1] = [6, 2], the smallest positive one. For this even D one has, with x = 2*X, X^2 - 8/4 y^2 = +1, which has an even positive fundamental solution y0 = 2, and r(2) = D(2)/4 = 2 is A007969(1).
		

References

  • Nagell, T. Introduction to number theory, Chelsea Publishing Company, 1964, page 52.

Crossrefs

Extensions

Offset corrected by Robin Visser, Jun 08 2025

A303604 Numbers n such that both n-1 and n are nonsquares and the least positive solutions to the Pell equations x1^2 - n*y1^2 =1 and x0^2-(n-1)*y0^2 = 1 have a record for rho(n)=log(x1)/log(x0).

Original entry on oeis.org

3, 6, 7, 13, 61, 157, 241, 409, 421, 1321, 1621, 3541, 4129, 5209, 5701, 8269, 9241, 9769, 11701, 12601, 13729, 18181, 27061, 32341, 39901, 78121, 78541, 118681, 129361, 153469, 189661, 207481, 314161, 431869, 451669, 455701, 507301, 655561, 842521, 979969
Offset: 1

Views

Author

Amiram Eldar, Apr 26 2018

Keywords

Comments

Jacobson & Williams proved that rho(n) can be arbitrarily large, therefore this sequence is infinite.
Of the first 40 terms only 6 is composite.

Examples

			n = 61 is in the sequence since the least positive solution to x^2-60*y^2 = 1 has x = 31, and the least positive solution to x^2-61*y^2 = 1 has x = 1766319049, so rho(61) = log(1766319049)/log(31) = 6.200... larger than for any smaller n.
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision= 1000; a[n_]:=If[IntegerQ[Sqrt[n]],0,For[y=1, !IntegerQ[ Sqrt[n*y^2+1]], y++, Null]; y];PellSolve[(m_Integer)?Positive] := Module[ {cf, n, s}, cof = ContinuedFraction[Sqrt[m]]; n = Length[ Last[cof]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; f[n_] := If[ !IntegerQ[ Sqrt[n]], PellSolve[n][[1]], 0]; rho[x0_,x1_]:=If[x0==0||x1==0,0,Log[x1]/Log[x0]]; x0=2; n=3; rhom=0; seq={};Do[x1=f[n]; rho1 = rho[x0,x1]; If[rho1 > rhom, AppendTo[seq, n];rhom=rho1];x0=x1;n++,{k,1,1000}]; seq
Previous Showing 11-17 of 17 results.