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-20 of 24 results. Next

A264354 Even nonsquare D values which admit proper solutions to the Pell equation x^2 - D*y^2 = +8.

Original entry on oeis.org

8, 28, 56, 92, 124, 136, 184, 188, 248, 284, 316, 376, 392, 412, 476, 508, 568, 604, 632, 668, 764, 776, 796, 824, 892, 952, 956, 1016, 1052, 1084, 1148, 1208, 1244, 1288, 1336, 1372, 1436, 1468, 1528, 1532
Offset: 1

Views

Author

Wolfdieter Lang, Nov 18 2015

Keywords

Comments

This is 4*A261246.
The proper positive fundamental solution (x1(n), y1(n)) of the first class is given by (2*A261247(n), A261248(n)) for D(n) = a(n), n >= 1. If there are two classes the proper positive fundamental solution (x2(n), y2(n)) for the second class is given by (A264357(n), A264386(n)) for D(n). If the fundamental solutions of the two classes coincide then there is only one class (the ambiguous case) for these D(n) values. It is conjectured that there are no more than two classes. For the computation of (x2(n), y2(n)) from (x1(n), -y1(n)) by application of the matrix M(n) for D(n) see a comment under A263012.
D = 8, 56, 136, 184, 248, 376, 392, 568, 632, 776, 824, 952, 1016, 1208, 1288, 1336, 1528, ... have only one class of solution, because for them (x1, y1) = (x2, y2). These D values are the ones with x1(n) = 2*sqrt(x0(n)+1) and y1(n) = 2*y0(n) / sqrt(x0(n)+1) where (x0(n), y0(n)) are the positive fundamental solution of the +1 Pell equation with D = D(n). These are the upper bounds of the inequalities, eqs. (4) and (5) given in the Nagell reference on p. 206. E.g., D = 184 = A000037(171) = a(8) with x0(8) = A033313(171) = 24335 and y0(8) = A033317(171) = 1794 leads to x1(8) = 2*sqrt(24336) = 312 and y1(8) = 2*1794/sqrt(24336) = 23. These D numbers with only one class of proper solutions are the entries which are divisible by 8, that is four times the even numbers of A261246.

Examples

			The first positive proper fundamental solutions of the first class are, when written as [D(n), (x1(n), y1(n))]:
[8, (4, 1)], [28, (6, 1)], [56, (8, 1)], [92, (10, 1)], [124, (78, 7)], [136, (12, 1)], [184, (312, 23)], ...
The first positive proper fundamental solutions of the second class [D(n), (x2(n), y2(n))] are (if the values for both classes coincide there is only one class):
[8, (4, 1)], [28, (90, 17)], [56, (8, 1)], [92, (470, 49)], [124, (237042, 21287)], [136, (12, 1)], [184, (312, 23)], ...
		

References

  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New Tork, 1964, p. 206.

Crossrefs

Cf. A000037, A033313, A033317, A261246, A263012 (odd D), A261247 (x1/2), A261248 (y1), A264438 (x2), A264439 (y2), A264355.

Formula

a(n) = 4*A261246(n).

A074074 The numbers D in the set {D :=(2n+1)^2-4m^2, 1<=m<=n} that generate the smallest solution x to x^2 - D*y^2 = 1.

Original entry on oeis.org

5, 21, 33, 17, 105, 105, 189, 33, 105, 405, 333, 141, 473, 57, 817, 189, 325, 885, 77, 1425, 1173, 1925, 1425, 2301, 101, 105, 1425, 333, 777, 1785, 2525, 381, 1785, 405, 141, 3393, 2261, 3813, 6045, 2717, 4389, 3129, 2093, 6765, 885, 5513, 189, 6045, 197, 8085
Offset: 1

Views

Author

Lekraj Beedassy, Aug 28 2002

Keywords

Comments

Given a discriminant D, the Pell equation x^2-D*y^2=1 has a minimum solution x as tabulated in A033313. We start with a set of candidates D of the form (2*n+1)^2-(2*m)^2, obviously all odd, where m runs through the integers from 1 to n.
Whichever D out of this set generates the smallest x in A033313, defines a(n)=D.

Examples

			For n=4, the candidates are D=77 (m=1, index 69 in A000037), D=65 (m=2, index 57 in A000037), D=45 (m=3, index 39 in A000037) and D=17 (m=4, index 13 in A000037), which produce x = 351, x=129, x=161 and x=33 in that order (apply the offset in A033313 while converting indices from A000037 to find the x). Because 33 is the smallest of these four x, we select the associated D=17 as a(4).
		

Crossrefs

Cf. A074075 (associated m values), A074076.

Programs

  • Maple
    A033313 := proc(Dcap) local c,i,fr,nu,de ; if issqr(Dcap) then -1; else c := numtheory[cfrac](sqrt(Dcap)) ; for i from 1 do try fr := numtheory[nthconver](c,i) ; nu := numer(fr) ; de := denom(fr) ; if nu^2-Dcap*de^2=1 then RETURN(nu) ; fi; catch: RETURN(-1) ; end try; od: fi: end:
    A074074 := proc(n) local Dmin,xmin,Dcap ; Dmin := -1 ; xmin := -1; for m from 1 to n do Dcap := (2*n+1+2*m)*(2*n+1-2*m) ; x := A033313(Dcap) ; if xmin = -1 or (x >0 and xA074074(n),n=1..50) ; # R. J. Mathar, Sep 21 2009
  • Mathematica
    a[n_] := Module[{dd, sols, x, y}, dd = Table[(2 n + 1)^2 - 4 m^2, {m, 1, n}]; sols = Table[{d, x /. Solve[x > 0 && y > 0 && x^2 - d y^2 == 1, {x, y}, Integers]}, {d, dd}] /. C[1] -> 1 // Select[#, #[[2]] != {}&]&; MinimalBy[sols, #[[2, 1]]&][[1, 1]]]; Array[a,50] (* Jean-François Alcover, Oct 23 2023 *)

Extensions

Definition clarified, sequence extended beyond a(7) - R. J. Mathar, Sep 21 2009

A180495 Coefficient a(n) of three-term recurrence relation for solutions of the equation in integers x^2-n*floor(x/sqrt(n))^2=1 such that x(i+2)=a(n)*x(i+1)-x(i). n is a nonsquare number.

Original entry on oeis.org

6, 4, 18, 10, 16, 6, 38, 20, 14, 1298, 30, 8, 66, 34, 340, 18, 110, 394, 48, 10, 102, 52, 254, 19602, 22, 3040, 34, 46, 70, 12, 146, 74, 50, 38, 4098, 26, 6964, 398, 322, 48670, 96, 14, 198, 100, 1298, 132498, 970, 178, 30, 302, 39206, 1060, 62, 3532638098, 126
Offset: 2

Views

Author

Carmine Suriano, Sep 08 2010

Keywords

Comments

a(n) is twice the corresponding term of sequence A033313.
Nonsquare values belong to sequence A000037. The equation is of a Pell type.

Examples

			For n=3 a(3)=4 since equation x^2-3*floor(x/sqrt(3))^2=1 has the following solutions: x=1, 2, 7, 26, 97, ... for which x(i+2)=4x(i+1)-x(i).
		

Crossrefs

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

A262027 The positive fundamental solutions x = x0(n) for the Pell equation x^2 - d*y^2 = +1 with odd y = y0(n). Then d coincides with d(n) = A007970(n).

Original entry on oeis.org

2, 8, 3, 10, 4, 170, 24, 5, 26, 1520, 17, 6, 19, 3482, 48, 7, 50, 530, 8, 48842, 3480, 26, 80, 9, 82, 28, 197, 1574, 49, 10, 227528, 51, 962, 1126, 120, 11, 122, 4730624, 577, 10610, 244, 35, 77563250, 12, 1728148040, 37, 1324, 721, 64080026, 168, 13, 170, 2024, 199, 4190210
Offset: 1

Views

Author

Wolfdieter Lang, Oct 04 2015

Keywords

Comments

The corresponding values y = y0(n) are given by A262026(n).
This is a proper subset of A033313 corresponding to D values from d(n) = A007970(n).
For the proof that d(n) = A007970(n), the products of Conway's 2-happy couples, see the W. Lang link under A007970.
If d(n) = A007970(n) is odd (necessarily congruent to 3 modulus 4) then x0(n) is even, and if d(n) is even (necessarily congruent to 0 modulus 8) then x0 is odd.

Examples

			For the first [d(n), x0(n), y0(n)] see A262026.
		

Crossrefs

Formula

a(n)^2 - d(n)*y0(n)^2 = +1 with y0(n) = A262026(n) and d(n) = A007970(n). (x0(n) = a(n), y0(n)) are the positive fundamental solutions of this Pell equation x^2 - d*y^2 = +1 with odd y = y0.

A074076 One-sixth of the area of some primitive Heronian triangles with a distance of 2n+1 between the median and altitude points on the longest side.

Original entry on oeis.org

60, 4620, 2024, 5984, 11480, 22960, 41580, 8096, 45920, 521640, 226884, 392920, 438944, 803320, 6725544, 207900, 37966500, 1544620, 6846840, 2295200, 2785484, 9009000, 4016600, 188375200, 3383500, 149240, 5738000, 875124, 12013456, 8848840
Offset: 1

Views

Author

Lekraj Beedassy, Aug 28 2002

Keywords

Comments

With N=2n+1, such a triangle has sides N*u +/- M, 2*M*u (the latter being cut into M*u +/- N by the corresponding altitude) and inradius M*(N - M)*v. The first entry, in particular, is associated with sequence A023039.

Crossrefs

Programs

  • Maple
    A033313 := proc(Dcap) local c,i,fr,nu,de ; if issqr(Dcap) then -1; else c := numtheory[cfrac](sqrt(Dcap)) ; for i from 1 do try fr := numtheory[nthconver](c,i) ; nu := numer(fr) ; de := denom(fr) ; if nu^2-Dcap*de^2=1 then RETURN(nu) ; fi; catch: RETURN(-1) ; end try; od: fi: end:
    A074076 := proc(n) local Dmin,xmin,Dcap ; Dmin := -1; xmin := -1; mmin := -1; ymin := -1; for m from 1 to n do Dcap := (2*n+1+2*m)*(2*n+1-2*m) ; x := A033313(Dcap) ; if xmin = -1 or (x >0 and xA074076(n),n=1..80) ; # R. J. Mathar, Sep 21 2009

Formula

a(n) = M(n)*D(n)*u(n)*v(n)/6, where (u, v) is the fundamental solution to x^2 - D*y^2 = 1, with M = 2*A074075(n); D = A074074(n) = N^2 - M^2.

Extensions

Removed assertion that these are the minimum areas - R. J. Mathar, Sep 21 2009

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
Previous Showing 11-20 of 24 results. Next