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

A097315 Pell equation solutions (3*b(n))^2 - 10*a(n)^2 = -1 with b(n) = A097314(n), n >= 0.

Original entry on oeis.org

1, 37, 1405, 53353, 2026009, 76934989, 2921503573, 110940200785, 4212806126257, 159975692596981, 6074863512559021, 230684837784645817, 8759948972303982025, 332647376109766671133, 12631840343198829521029, 479677285665445755127969, 18215105014943739865341793, 691694313282196669127860165
Offset: 0

Views

Author

Wolfdieter Lang, Aug 31 2004

Keywords

Comments

Hypotenuses of primitive Pythagorean triples in A195616 and A195617. - Clark Kimberling, Sep 22 2011

Examples

			(x,y) = (3,1), (117,37), (4443,1405), ... give the positive integer solutions to x^2 - 10*y^2 = -1.
G.f. = 1 + 37*x + 1405*x^2 + 53353*x^3 + ... - _Michael Somos_, Feb 24 2023
		

Crossrefs

Row 3 of array A188647.
Cf. A221874.
Cf. similar sequences listed in A238379.

Programs

  • GAP
    a:=[1,37];; for n in [3..20] do a[n]:=38*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Aug 01 2019
    
  • Magma
    I:=[1, 37]; [n le 2 select I[n] else 38*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 01 2019
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-38x+x^2), {x,0,20}], x] (* Michael De Vlieger, Feb 04 2017 *)
    LinearRecurrence[{38,-1}, {1,37}, 21] (* G. C. Greubel, Aug 01 2019 *)
  • PARI
    Vec((1-x)/(1-38*x+x^2) + O(x^20)) \\ Michel Marcus, Jun 04 2015
    
  • Python
    from itertools import islice
    def A097315_gen(): # generator of terms
        x, y = 30, 10
        while True:
            yield y//10
            x, y = x*19+y*60, x*6+y*19
    A097315_list = list(islice(A097315_gen(),20)) # Chai Wah Wu, Apr 24 2025
  • Sage
    ((1-x)/(1-38*x+x^2)).series(x, 20).coefficients(x, sparse=False) # G. C. Greubel, Aug 01 2019
    

Formula

a(n) = S(n, 38) - S(n-1, 38) = T(2*n+1, sqrt(10))/sqrt(10), with Chebyshev polynomials of the second and first kind. See A049310 for the triangle of S(n, x)= U(n, x/2) coefficients. S(-1, x) := 0 =: U(-1, x); and A053120 for the T-triangle.
a(n) = ((-1)^n)*S(2*n, 6*i) with the imaginary unit i and Chebyshev polynomials S(n, x) with coefficients shown in A049310.
G.f.: (1-x)/(1-38*x+x^2).
a(n) = 38*a(n-1) - a(n-2) for n > 1. - Philippe Deléham, Nov 18 2008
a(n) = sqrt(2+(19-6*sqrt(10))^(1+2*n) + (19+6*sqrt(10))^(1+2*n))/(2*sqrt(10)). - Gerry Martens, Jun 04 2015
a(n) = A078987(n) - A078987(n-1). - R. J. Mathar, Dec 05 2015
a(n) = A005668(2*n+1). - Michael Somos, Feb 24 2023
E.g.f.: exp(19*x)*(10*cosh(6*sqrt(10)*x) + 3*sqrt(10)*sinh(6*sqrt(10)*x))/10. - Stefano Spezia, Apr 24 2025

Extensions

Typo in recurrence formula corrected by Laurent Bonaventure (bonave(AT)free.fr), Oct 03 2010
More terms added by Indranil Ghosh, Feb 04 2017

A078987 Chebyshev U(n,x) polynomial evaluated at x=19.

Original entry on oeis.org

1, 38, 1443, 54796, 2080805, 79015794, 3000519367, 113940720152, 4326746846409, 164302439443390, 6239165952002411, 236924003736648228, 8996872976040630253, 341644249085807301386, 12973484592284636822415, 492650770257730391950384, 18707755785201470257292177
Offset: 0

Views

Author

Wolfdieter Lang, Jan 10 2003

Keywords

Comments

A078986(n+1)^2 - 10*(6*a(n))^2 = +1, n>=0 (Pell equation +1, see A033313 and A033317).
a(n) equals the number of 01-avoiding words of length n on alphabet {0,1,...,37}. - Milan Janjic, Jan 26 2015

Crossrefs

Chebyshev sequence U(n, m): A000027 (m=1), A001353 (m=2), A001109 (m=3), A001090 (m=4), A004189 (m=5), A004191 (m=6), A007655 (m=7), A077412 (m=8), A049660 (m=9), A075843 (m=10), A077421 (m=11), A077423 (m=12), A097309 (m=13), A097311 (m=14), A097313 (m=15), A029548 (m=16), A029547 (m=17), A144128 (m=18), this sequence (m=19), A097316 (m=33).

Programs

  • GAP
    m:=19;; a:=[1,2*m];; for n in [3..20] do a[n]:=2*m*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 22 2019
  • Magma
    m:=19; I:=[1, 2*m]; [n le 2 select I[n] else 2*m*Self(n-1) -Self(n-2): n in [1..20]]; // G. C. Greubel, Dec 22 2019
    
  • Maple
    seq( simplify(ChebyshevU(n, 19)), n=0..20); # G. C. Greubel, Dec 22 2019
  • Mathematica
    lst={};Do[AppendTo[lst, GegenbauerC[n, 1, 19]], {n, 0, 8^2}];lst (* Vladimir Joseph Stephan Orlovsky, Sep 11 2008 *)
    ChebyshevU[Range[21] -1, 19] (* G. C. Greubel, Dec 22 2019 *)
  • PARI
    a(n)=subst(polchebyshev(n,2),x,19) \\ Charles R Greathouse IV, Feb 10 2012
    
  • PARI
    Vec(1/(1-38*x+x^2) + O(x^50)) \\ Colin Barker, Jun 15 2015
    
  • Sage
    [lucas_number1(n,38,1) for n in range(1, 16)] # Zerinvary Lajos, Nov 07 2009
    
  • Sage
    [chebyshev_U(n,19) for n in (0..20)] # G. C. Greubel, Dec 22 2019
    

Formula

a(n) = 38*a(n-1) - a(n-2), n>=1, a(-1)=0, a(0)=1.
a(n) = S(n, 38) with S(n, x) = U(n, x/2), Chebyshev's polynomials of the second kind. See A049310.
G.f.: 1/(1-38*x+x^2).
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*38^(n-2*k).
a(n) = ((19+6*sqrt(10))^(n+1) - (19-6*sqrt(10))^(n+1))/(12*sqrt(10)).
a(n) = Sum_{k=0..n} A101950(n,k)*37^k. - Philippe Deléham, Feb 10 2012
Product_{n>=0} (1 + 1/a(n)) = 1/3*(3 + sqrt(10)). - Peter Bala, Dec 23 2012
Product_{n>=1} (1 - 1/a(n)) = 3/19*(3 + sqrt(10)). - Peter Bala, Dec 23 2012
From Andrea Pinos, Jan 02 2023: (Start)
a(n) = (A097314(n+1) - A097315(n+1))/2.
a(n) = (A097314(n) + A097315(n))/2. (End)

A097775 Pell equation solutions (14*a(n))^2 - 197*b(n)^2 = -1 with b(n) = A097776(n), n >= 0.

Original entry on oeis.org

1, 787, 618581, 486203879, 382155630313, 300373839222139, 236093455472970941, 185569155627915937487, 145857120230086453893841, 114643510931692324844621539, 90109653735189937241418635813, 70826073192348358979430203127479, 55669203419532074967894898239562681
Offset: 0

Views

Author

Wolfdieter Lang, Aug 31 2004

Keywords

Examples

			(x,y) = (14*1=14;1), (11018=14*787;785), (8660134=14*618581;617009), ... give the positive integer solutions to x^2 - 197*y^2 =-1.
		

Crossrefs

Cf. A097774 for S(n, 2*393).
Cf. similar sequences of the type (1/k)*sinh((2*n + 1)*arcsinh(k)): A002315 (k=1), A049629 (k=2), A097314 (k=3), A078989 (k=4), A097726 (k=5), A097729 (k=6), A097732 (k=7), A097735 (k=8), A097738 (k=9), A097741 (k=10), A097766 (k=11), A097769 (k=12), A097772 (k=13), this sequence (k=14).

Programs

  • Mathematica
    LinearRecurrence[{786, -1}, {1, 787}, 20] (* Harvey P. Dale, Dec 12 2017 *)
  • PARI
    Vec((1+x)/(1-2*393*x+x^2) + O(x^100)) \\ Colin Barker, Apr 04 2015

Formula

G.f.: (1 + x)/(1 - 2*393*x + x^2).
a(n) = S(n, 2*393) + S(n-1, 2*393) = S(2*n, 2*sqrt(197)), with Chebyshev polynomials of the 2nd kind. See A049310 for the triangle of S(n, x) = U(n, x/2) coefficients. S(-1, x) = 0 = U(-1, x).
a(n) = ((-1)^n)*T(2*n+1, 14*i)/(14*i) with the imaginary unit i and Chebyshev polynomials of the first kind. See the T-triangle A053120.
a(n) = 786*a(n-1) - a(n-2) for n > 1; a(0)=1, a(1)=787. - Philippe Deléham, Nov 18 2008
a(n) = (1/14)*sinh((2*n + 1)*arcsinh(14)). - Bruno Berselli, Apr 05 2018

A157014 Expansion of x*(1-x)/(1 - 22*x + x^2).

Original entry on oeis.org

1, 21, 461, 10121, 222201, 4878301, 107100421, 2351330961, 51622180721, 1133336644901, 24881784007101, 546265911511321, 11992968269241961, 263299036011811821, 5780585823990618101, 126909589091781786401, 2786230374195208682721, 61170158643202809233461
Offset: 1

Views

Author

Paul Weisenhorn, Feb 21 2009

Keywords

Comments

This sequence is part of a solution of a general problem involving 2 equations, three sequences a(n), b(n), c(n) and a constant A:
A * c(n)+1 = a(n)^2,
(A+1) * c(n)+1 = b(n)^2, where solutions are given by the recurrences:
a(1) = 1, a(2) = 4*A+1, a(n) = (4*A+2)*a(n-1)-a(n-2) for n>2, resulting in a(n) terms 1, 4*A+1, 16*A^2+12*A+1, 64*A^3+80*A^2+24*A+1, ...;
b(1) = 1, b(2) = 4*A+3, b(n) = (4*A+2)*b(n-1)-b(n-2) for n>2, resulting in b(n) terms 1, 4*A+3, 16*A^2+20*A+5, 64*A^3+112*A^2+56*A+7, ...;
c(1) = 0, c(2) = 16*A+8, c(3) = (16*A^2+16*A+3)*c(2), c(n) = (16*A^2+16*A+3) * (c(n-1)-c(n-2)) + c(n-3) for n>3, resulting in c(n) terms 0, 16*A+8, 256*A^3+384*A^2+176*A+24, 4096*A^5 + 10240*A^4 + 9472*A^3 + 3968*A^2 + 736*A + 48, ... .
A157014 is the a(n) sequence for A=5.
For other A values the a(n), b(n) and c(n) sequences are in the OEIS:
A a-sequence b-sequence c-sequence
2 A072256 A054320(n-1) A045502(n-1)
9 A097315(n-1) A097314(n-1) A157881
Positive values of x (or y) satisfying x^2 - 22xy + y^2 + 20 = 0. - Colin Barker, Feb 19 2014
From Klaus Purath, Apr 22 2025: (Start)
Nonnegative solutions to the Diophantine equation 5*b(n)^2 - 6*a(n)^2 = -1. The corresponding b(n) are A133283(n). Note that (b(n+1)^2 - b(n)*b(n+2))/4 = 6 and (a(n)*a(n+2) - a(n+1)^2)/4 = 5.
(a(n) + b(n))/2 = (b(n+1) - a(n+1))/2 = A077421(n-1) = Lucas U(22,1). Also b(n)*a(n+1) - b(n+1)*a(n) = -2.
a(n)=(t(i+2*n-1) + t(i))/(t(i+n) + t(i+n-1)) as long as t(i+n) + t(i+n-1) != 0 for any integer i and n >= 1 where (t) is a sequence satisfying t(i+3) = 21*t(i+2) - 21*t(i+1) + t(i) or t(i+2) = 22*t(i+1) - t(i) without regard to initial values and including this sequence itself. (End)

Crossrefs

Cf. similar sequences listed in A238379.

Programs

  • GAP
    a:=[1,21];; for n in [3..20] do a[n]:=22*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jan 14 2020
  • Magma
    I:=[1,21]; [n le 2 select I[n] else 22*Self(n-1)-Self(n-2): n in [1..20]]; // Vincenzo Librandi, Feb 21 2014
    
  • Maple
    seq( simplify(ChebyshevU(n-1,11) - ChebyshevU(n-2,11)), n=1..20); # G. C. Greubel, Jan 14 2020
  • Mathematica
    CoefficientList[Series[(1-x)/(1-22x+x^2), {x,0,20}], x] (* Vincenzo Librandi, Feb 21 2014 *)
    a[c_, n_] := Module[{},
       p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
       d := Denominator[Convergents[Sqrt[c], n p]];
       t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
       Return[t];
    ] (* Complement of A041049 *)
    a[30, 20] (* Gerry Martens, Jun 07 2015 *)
    Table[ChebyshevU[n-1, 11] - ChebyshevU[n-2, 11], {n,20}] (* G. C. Greubel, Jan 14 2020 *)
  • PARI
    Vec((1-x)/(1-22*x+x^2)+O(x^20)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • Sage
    [chebyshev_U(n-1,11) - chebyshev_U(n-2,11) for n in (1..20)] # G. C. Greubel, Jan 14 2020
    

Formula

G.f.: x*(1-x)/(1-22*x+x^2).
a(1) = 1, a(2) = 21, a(n) = 22*a(n-1) - a(n-2) for n>2.
5*A157460(n)+1 = a(n)^2 for n>=1.
6*A157460(n)+1 = A133283(n)^2 for n>=1.
a(n) = (6+sqrt(30)-(-6+sqrt(30))*(11+2*sqrt(30))^(2*n))/(12*(11+2*sqrt(30))^n). - Gerry Martens, Jun 07 2015
a(n) = ChebyshevU(n-1, 11) - ChebyshevU(n-2, 11). - G. C. Greubel, Jan 14 2020

Extensions

Edited by Alois P. Heinz, Sep 09 2011

A195616 Denominators of Pythagorean approximations to 3.

Original entry on oeis.org

12, 444, 16872, 640680, 24328980, 923860548, 35082371856, 1332206269968, 50588755886940, 1921040517433740, 72948950906595192, 2770139093933183544, 105192336618554379492, 3994538652411133237140, 151687276455004508631840
Offset: 1

Views

Author

Clark Kimberling, Sep 22 2011

Keywords

Comments

See A195500 for a discussion and references.

Crossrefs

Programs

  • Magma
    I:=[12, 444, 16872]; [n le 3 select I[n] else 37*Self(n-1) +37*Self(n-2) -Self(n-3): n in [1..40]]; // G. C. Greubel, Feb 13 2023
    
  • Mathematica
    r = 3; z = 20;
    p[{f_, n_}] := (#1[[2]]/#1[[
          1]] &)[({2 #1[[1]] #1[[2]], #1[[1]]^2 - #1[[
             2]]^2} &)[({Numerator[#1], Denominator[#1]} &)[
         Array[FromContinuedFraction[
            ContinuedFraction[(#1 + Sqrt[1 + #1^2] &)[f], #1]] &, {n}]]]];
    {a, b} = ({Denominator[#1], Numerator[#1]} &)[
      p[{r, z}]]  (* A195616, A195617 *)
    Sqrt[a^2 + b^2] (* A097315 *)
    (* Peter J. C. Moses, Sep 02 2011 *)
    Table[(1/20)*(LucasL[2*n+1,6] -6*(-1)^n), {n,40}] (* G. C. Greubel, Feb 13 2023 *)
  • PARI
    Vec(12*x/((1+x)*(1-38*x+x^2)) + O(x^20)) \\ Colin Barker, Jun 04 2015
    
  • SageMath
    A085447=BinaryRecurrenceSequence(6,1,2,6)
    [(A085447(2*n+1) - 6*(-1)^n)/20 for n in range(1,41)] # G. C. Greubel, Feb 13 2023

Formula

From Colin Barker, Jun 04 2015: (Start)
a(n) = 37*a(n-1) + 37*a(n-2) - a(n-3).
G.f.: 12*x / ((1+x)*(1-38*x+x^2)). (End)
From G. C. Greubel, Feb 13 2023: (Start)
a(n) = (3/10)*(A097314(n) + (-1)^n).
a(n) = (1/20)*(A085447(2*n+1) - 6*(-1)^n). (End)

A157881 Expansion of 152*x^2 / (-x^3+1443*x^2-1443*x+1).

Original entry on oeis.org

0, 152, 219336, 316282512, 456079163120, 657665836936680, 948353680783529592, 1367525350024012735136, 1971970606380945580536672, 2843580246875973503121146040, 4100440744024547410555112053160, 5912832709303150490046968459510832
Offset: 1

Views

Author

Paul Weisenhorn, Mar 08 2009, Jun 25 2009

Keywords

Comments

This sequence is part of a solution of a more general problem involving two equations, three sequences a(n), b(n), c(n) and a constant A:
A * c(n)+1 = a(n)^2,
(A+1) * c(n)+1 = b(n)^2, for details see comment in A157014.
A157881 is the c(n) sequence for A=9.

Crossrefs

8*A157881(n)+1 = A097315(n-1)^2.
9*A157881(n)+1 = A097314(n-1)^2.

Programs

  • Mathematica
    LinearRecurrence[{1443,-1443,1},{0,152,219336},20] (* Harvey P. Dale, Jul 18 2019 *)
  • PARI
    concat(0, Vec(152*x^2/(-x^3+1443*x^2-1443*x+1) + O(x^20))) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    a(n) = round(-((721+228*sqrt(10))^(-n)*(-1+(721+228*sqrt(10))^n)*(19+6*sqrt(10)+(-19+6*sqrt(10))*(721+228*sqrt(10))^n))/360) \\ Colin Barker, Jul 25 2016

Formula

G.f.: 152*x^2/(-x^3+1443*x^2-1443*x+1).
c(1) = 0, c(2) = 152, c(3) = 1443*c(2), c(n) = 1443 * (c(n-1)-c(n-2)) + c(n-3) for n>3.
a(n) = -((721+228*sqrt(10))^(-n)*(-1+(721+228*sqrt(10))^n)*(19+6*sqrt(10)+(-19+6*sqrt(10))*(721+228*sqrt(10))^n))/360. - Colin Barker, Jul 25 2016

Extensions

Edited by Alois P. Heinz, Sep 09 2011

A226694 Pell equation solutions (32*a(n))^2 - 41*(5*b(n))^2 = -1 with b(n) := A226695(n), n>=0.

Original entry on oeis.org

1, 4099, 16797701, 68836974599, 282093905109001, 1156020754299711499, 4737372769026312613901, 19413752451449074792054799, 79557552808665539471527952401, 326026831996158929305246756884499, 1336057877962706483627361738184724501
Offset: 0

Views

Author

Wolfdieter Lang, Jun 20 2013

Keywords

Examples

			Pell n=0: 32^2 - 41*5^2 = -1.
Pell n=1: (32*4099)^2 - 41*(5*4097)^2 = -1.
		

Crossrefs

Cf. A097314, A097315 (Pell -1 with D = 10), A226695.

Programs

  • Mathematica
    LinearRecurrence[{4098,-1},{1,4099},20] (* Harvey P. Dale, Sep 23 2017 *)

Formula

a(n) = S(n,4098)+ S(n-1,4098), n>=0, with the Chebyshev S-polynomials (A049310). 4098 = 17*241 is the smallest positive integer x solution of x^2 - 41*y^2 = +4 with y also positive.
O.g.f.: (1 + x)/(1 - 4098*x + x^2).
a(n) = 4098*a(n-1) - a(n-2), a(-1) = -1 , a(0) = 1.

A309330 Numbers k such that 10*k^2 + 40 is a square.

Original entry on oeis.org

6, 234, 8886, 337434, 12813606, 486579594, 18477210966, 701647437114, 26644125399366, 1011775117738794, 38420810348674806, 1458979018131903834, 55402781878663670886, 2103846732371087589834, 79890773048222664742806
Offset: 1

Views

Author

Greg Dresden, Jul 23 2019

Keywords

Comments

Sequence of all positive integers k such that the continued fraction [k,k,k,k,k,k,...] belongs to Q(sqrt(10)).
As 10*n^2 + 40 = 10 * (n^2 + 4), n == 6 (mod 10) or n == 4 (mod 10) alternately. - Bernard Schott, Jul 24 2019

Examples

			a(2) = 234, and 10*234^2 + 40 is indeed a perfect square (it's 740^2) and furthermore the continued fraction [234, 234, 234, 234, ...] equals 117 + 37*sqrt(10), which is indeed in Q(sqrt(10)).
		

Crossrefs

Cf. A097315.

Programs

  • Mathematica
    LinearRecurrence[{38, -1}, {6, 234}, 15]
  • PARI
    Vec(6*x*(1 + x) / (1 - 38*x + x^2) + O(x^20)) \\ Colin Barker, Jul 24 2019

Formula

a(n) = 38*a(n-1) - a(n-2); a(1) = 6, a(2) = 234.
a(n) = 2*sqrt(10*A097315(n-1)^2-1).
a(n) = (3-sqrt(10))*(19-6*sqrt(10))^(n-1) + (3+sqrt(10))*(19+6*sqrt(10))^(n-1). - Jinyuan Wang, Jul 24 2019
G.f.: 6*x*(1 + x) / (1 - 38*x + x^2). - Colin Barker, Jul 24 2019
a(n) = 6*A097314(n-1). - R. J. Mathar, Sep 06 2020
Showing 1-8 of 8 results.