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.

A041006 Numerators of continued fraction convergents to sqrt(6).

Original entry on oeis.org

2, 5, 22, 49, 218, 485, 2158, 4801, 21362, 47525, 211462, 470449, 2093258, 4656965, 20721118, 46099201, 205117922, 456335045, 2030458102, 4517251249, 20099463098, 44716177445, 198964172878, 442644523201, 1969542265682, 4381729054565, 19496458483942
Offset: 0

Views

Author

Keywords

Comments

Interspersion of 2 sequences, 2*A054320 and A001079. - Gerry Martens, Jun 10 2015

Crossrefs

Cf. A041007 (denominators).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042936 (m=1000).

Programs

  • Magma
    I:=[2, 5, 22, 49]; [n le 4 select I[n] else 10*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 10 2015
    
  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[6],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
    LinearRecurrence[{0, 10, 0, -1}, {2, 5, 22, 49}, 50] (* Vincenzo Librandi, Jun 10 2015 *)
  • PARI
    A41006=contfracpnqn(c=contfrac(sqrt(6)), #c)[1, ][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A41006[n+1]! M. F. Hasler, Nov 01 2019
    
  • PARI
    \\ For correct index & more terms:
    A041006(n)={n<#A041006|| A041006=extend(A041006, [2, 10; 4, -1], n\.8); A041006[n+1]}
    extend(A, c, N)={for(n=#A+1, #A=Vec(A, N), A[n]=[A[n-i]|i<-c[, 1]]*c[, 2]); A} \\ M. F. Hasler, Nov 01 2019

Formula

From M. F. Hasler, Feb 13 2009: (Start)
a(2n) = 2*A142238(2n) = A041038(2n)/2;
a(2n-1) = A142238(2n-1) = A041038(2n-1) = A001079(n). (End)
G.f.: (2 + 5*x + 2*x^2 - x^3)/(1 - 10*x^2 + x^4).
a(n) = ((2 + sqrt(6))^(n+1) + (2 - sqrt(6))^(n+1))/2^(ceiling(n/2) + 1). - Robert FERREOL, Oct 13 2024
E.g.f.: sqrt(2)*sinh(sqrt(2)*x)*(cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)) + cosh(sqrt(2)*x)*(2*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - Stefano Spezia, Oct 14 2024

Extensions

More terms from Vincenzo Librandi, Jun 10 2015

A041008 Numerators of continued fraction convergents to sqrt(7).

Original entry on oeis.org

2, 3, 5, 8, 37, 45, 82, 127, 590, 717, 1307, 2024, 9403, 11427, 20830, 32257, 149858, 182115, 331973, 514088, 2388325, 2902413, 5290738, 8193151, 38063342, 46256493, 84319835, 130576328, 606625147, 737201475, 1343826622, 2081028097, 9667939010, 11748967107, 21416906117
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A010465, A041009 (denominators), A266698 (quadrisection), A001081 (quadrisection).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041010 (m=8), A005667 (m=10), A041014 (m=11), A041016 (m=12), ..., A042934 (m=999), A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[7],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
    Numerator[Convergents[Sqrt[7], 30]] (* Vincenzo Librandi, Oct 28 2013 *)
    LinearRecurrence[{0,0,0,16,0,0,0,-1},{2,3,5,8,37,45,82,127},40] (* Harvey P. Dale, Jul 23 2021 *)
  • PARI
    A041008=contfracpnqn(c=contfrac(sqrt(7)),#c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041008[n+1]! For more terms use:
    A041008(n)={n<#A041008|| A041008=extend(A041008, [4, 16; 8, -1], n\.8); A041008[n+1]}
    extend(A,c,N)={for(n=#A+1, #A=Vec(A, N), A[n]=[A[n-i]|i<-c[,1]]*c[,2]); A} \\ (End)

Formula

G.f.: (2 + 3*x + 5*x^2 + 8*x^3 + 5*x^4 - 3*x^5 + 2*x^6 - x^7)/(1 - 16*x^4 + x^8).

A041014 Numerators of continued fraction convergents to sqrt(11).

Original entry on oeis.org

3, 10, 63, 199, 1257, 3970, 25077, 79201, 500283, 1580050, 9980583, 31521799, 199111377, 628855930, 3972246957, 12545596801, 79245827763, 250283080090, 1580944308303, 4993116004999, 31539640338297
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A010468, A041015 (denominators).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041016 (m=12), ..., A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[11],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
    Numerator[Convergents[Sqrt[11], 30]] (* Vincenzo Librandi, Oct 28 2013 *)
  • PARI
    A041014=contfracpnqn(c=contfrac(sqrt(11)), #c)[1,][^-1] \\ Discard last element which may be incorrect. Use e.g. \p999 to get more terms, or extend as follows:
    {A041014_upto(N,A=Vec(A041014,N))=for(n=#A041014+1,N, A[n]=20*A[n-2]-A[n-4]); A041014=A} \\ M. F. Hasler, Nov 01 2019

Formula

G.f.: (3 + 10*x + 3*x^2 - x^3)/(1 - 20*x^2 + x^4).

A041011 Denominators of continued fraction convergents to sqrt(8).

Original entry on oeis.org

1, 1, 5, 6, 29, 35, 169, 204, 985, 1189, 5741, 6930, 33461, 40391, 195025, 235416, 1136689, 1372105, 6625109, 7997214, 38613965, 46611179, 225058681, 271669860, 1311738121, 1583407981, 7645370045, 9228778026, 44560482149
Offset: 0

Views

Author

Keywords

Comments

Sqrt(8) = 2 + continued fraction [0; 1, 4, 1, 4, 1, 4, ...] = 4/2 + 4/5 + 4/(5*29) + 4/(29*169) + 4/(169*985) + ... - Gary W. Adamson, Dec 21 2007
This is the sequence of Lehmer numbers U_n(sqrt(R),Q) with the parameters R = 4 and Q = -1. It is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for all natural numbers n and m. - Peter Bala, May 12 2014
Apparently the same as A152118(n). - Georg Fischer, Jul 01 2019

Crossrefs

Programs

  • Magma
    I:=[1, 1, 5, 6]; [n le 4 select I[n] else 6*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 10 2013
    
  • Maple
    with(combinat): a := n -> fibonacci(n + 1, 2)/2^(n mod 2):
    seq(a(n), n = 0 .. 28); # Miles Wilson, Aug 04 2024
  • Mathematica
    Denominator[NestList[(4/(4 + #))&, 0, 60]] (* Vladimir Joseph Stephan Orlovsky, Apr 13 2010 *)
    CoefficientList[Series[(x + x^2 - x^3)/(1 - 6 x^2 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 10 2013 *)
    a0[n_] := ((3-2*Sqrt[2])^n*(2+Sqrt[2])-(-2+Sqrt[2])*(3+2*Sqrt[2])^n)/4 // Simplify
    a1[n_] := (-(3-2*Sqrt[2])^n+(3+2*Sqrt[2])^n)/(4*Sqrt[2]) // Simplify
    Flatten[MapIndexed[{a0[#], a1[#]} &,Range[20]]] (* Gerry Martens, Jul 11 2015 *)
    LinearRecurrence[{0,6,0,-1},{1,1,5,6},40] (* Harvey P. Dale, Oct 21 2024 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,6,0]^n*[1;1;5;6])[1,1] \\ Charles R Greathouse IV, Nov 13 2015
    
  • PARI
    my(x='x+O('x^99)); concat(0, Vec((1+x-x^2)/(1-6*x^2+x^4))) \\ Altug Alkan, Mar 27 2016

Formula

a(2n) = A000129(2n+1), a(2n+1) = A000129(2n+2)/2.
a(n) = 6*a(n-2) - a(n-4). Also:
a(2n) = a(2n-1)+a(2n-2), a(2n+1)=4*a(2n)+a(2n-1).
G.f.: (1+x-x^2)/(1-6*x^2+x^4).
From Peter Bala, May 12 2014: (Start)
For n even, a(n) = (alpha^n - beta^n)/(alpha - beta), and for n odd, a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2), where alpha = 1 + sqrt(2) and beta = 1 - sqrt(2).
a(n) = Product_{k = 1..floor((n-1)/2)} ( 4 + 4*cos^2(k*Pi/n) ) for n >= 1. (End)
From Gerry Martens, Jul 11 2015: (Start)
Interspersion of 2 sequences [a0(n),a1(n)] for n>0:
a0(n) = ((3-2*sqrt(2))^n*(2+sqrt(2))-(-2+sqrt(2))*(3+2*sqrt(2))^n)/4.
a1(n) = (-(3-2*sqrt(2))^n+(3+2*sqrt(2))^n)/(4*sqrt(2)). (End)
a(n) = ((-(-1 - sqrt(2))^n - 3*(1-sqrt(2))^n + (-1+sqrt(2))^n + 3*(1+sqrt(2))^n))/(8*sqrt(2)). - Colin Barker, Mar 27 2016

Extensions

Entry improved by Michael Somos
First term 0 in b-file, formulas and programs removed by Georg Fischer, Jul 01 2019

A042936 Numerators of continued fraction convergents to sqrt(1000).

Original entry on oeis.org

31, 32, 63, 95, 158, 253, 1676, 3605, 8886, 136895, 282676, 702247, 4496158, 5198405, 9694563, 14892968, 24587531, 39480499, 2472378469, 2511858968, 4984237437, 7496096405, 12480333842, 19976430247, 132338915324, 284654260895, 701647437114, 10809365817605, 22320379072324
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A042937 (denominators).
Analog for sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042934 (m=999).

Programs

  • Mathematica
    Numerator[Convergents[Sqrt[1000], 30]] (* Harvey P. Dale, Oct 29 2013 *)
  • PARI
    A42936=contfracpnqn(c=contfrac(sqrt(1000)), #c)[1,][^-1] \\ Discards possibly incorrect last term. NB: a(n)=A42936[n+1]. Could be extended using: {A42936=concat(A42936, 78960998*A42936[-18..-1]-A42936[-36..-19])}
    \\ But terms with arbitrarily large indices can be computed using:
    A042936(n)={[A42936[n%18+i]|i<-[1, 19]]*([0, -1; 1, 78960998]^(n\18))[,1]} \\ Faster but longer with n=divrem(n,18). (End)

A042934 Numerators of continued fraction convergents to sqrt(999).

Original entry on oeis.org

31, 32, 63, 95, 158, 885, 5468, 6353, 37233, 80819, 441328, 522147, 3574210, 18393197, 21967407, 40360604, 62328011, 102688615, 6429022141, 6531710756, 12960732897, 19492443653, 32453176550
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A042935 (denominators).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A041010 (m=8), A005667 (m=10), A041014 (m=11), ..., A042936 (m=1000).

Programs

  • Mathematica
    Numerator[Convergents[Sqrt[999], 30]] (* Vincenzo Librandi, Dec 10 2013 *)
  • PARI
    A42934=contfracpnqn(c=contfrac(sqrt(999)), #c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n) = A42934[n+1]! For more terms, use:
    A042934(n)={n<#A42934 || A42934_upto(n+10); A42934[n+1]}
    {A42934_upto(N,A=Vec(A42934,N))=for(n=#A42934+1,N, A[n]=205377230*A[n-18]-A[n-36]); A42934=A} \\ M. F. Hasler, Nov 01 2019

Formula

a(n) = 205377230*a(n-18) - a(n-36). - Wesley Ivan Hurt, May 28 2021
Showing 1-6 of 6 results.