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

A010465 Decimal expansion of square root of 7.

Original entry on oeis.org

2, 6, 4, 5, 7, 5, 1, 3, 1, 1, 0, 6, 4, 5, 9, 0, 5, 9, 0, 5, 0, 1, 6, 1, 5, 7, 5, 3, 6, 3, 9, 2, 6, 0, 4, 2, 5, 7, 1, 0, 2, 5, 9, 1, 8, 3, 0, 8, 2, 4, 5, 0, 1, 8, 0, 3, 6, 8, 3, 3, 4, 4, 5, 9, 2, 0, 1, 0, 6, 8, 8, 2, 3, 2, 3, 0, 2, 8, 3, 6, 2, 7, 7, 6, 0, 3, 9, 2, 8, 8, 6, 4, 7, 4, 5, 4, 3, 6, 1
Offset: 1

Views

Author

Keywords

Comments

Continued fraction expansion is 2 followed by {1, 1, 1, 4} repeated. - Harry J. Smith, Jun 01 2009
The convergents to sqrt(7) are given in A041008/A041009. - Wolfdieter Lang, Nov 22 2017

Examples

			2.645751311064590590501615753639260425710259183082450180368334459201...
		

Crossrefs

Cf. A010121 (continued fraction), A041008/A041009.

Programs

  • Magma
    SetDefaultRealField(RealField(100)); Sqrt(7); // Vincenzo Librandi, Feb 15 2020
  • Mathematica
    RealDigits[N[Sqrt[7], 200]][[1]] (* Vladimir Joseph Stephan Orlovsky, Feb 21 2011 *)
  • PARI
    default(realprecision, 20080); x=sqrt(7); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b010465.txt", n, " ", d));  \\ Harry J. Smith, Jun 01 2009
    

Formula

Equals 8*cos(Pi/14)*sin(2*Pi/14)*cos(3*Pi/14). - Gerry Martens, Mar 13 2025

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

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).

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)

A041009 Denominators of continued fraction convergents to sqrt(7).

Original entry on oeis.org

1, 1, 2, 3, 14, 17, 31, 48, 223, 271, 494, 765, 3554, 4319, 7873, 12192, 56641, 68833, 125474, 194307, 902702, 1097009, 1999711, 3096720, 14386591, 17483311, 31869902, 49353213, 229282754, 278635967
Offset: 0

Views

Author

Keywords

Comments

Sqrt(7) = 2 + 9/14 + 9/(14*223) + 9/(223*3554) + 9/(3554*56641) + ...; sum of these 5 terms = 2.64575131088, with sqrt(7) = 2.64575131106... The terms 14, 223, 3554, ... = a(4), a(8), a(12), ... - Gary W. Adamson, Dec 27 2007

Crossrefs

Programs

  • Mathematica
    Table[Denominator[FromContinuedFraction[ContinuedFraction[Sqrt[7],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011*)
    Denominator[Convergents[Sqrt[7],30]] (* or *) LinearRecurrence[ {0,0,0,16,0,0,0,-1},{1,1,2,3,14,17,31,48},30] (* Harvey P. Dale, Dec 17 2019 *)

Formula

G.f.: (1+x+2*x^2+3*x^3-2*x^4+x^5-x^6)/(1-16*x^4+x^8). - Colin Barker, Mar 13 2012

A041010 Numerators of continued fraction convergents to sqrt(8).

Original entry on oeis.org

2, 3, 14, 17, 82, 99, 478, 577, 2786, 3363, 16238, 19601, 94642, 114243, 551614, 665857, 3215042, 3880899, 18738638, 22619537, 109216786, 131836323, 636562078, 768398401, 3710155682, 4478554083, 21624372014, 26102926097, 126036076402, 152139002499
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A040005 (continued fraction), A041011 (denominators), A010466 (decimals).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041008 (m=7), A005667 (m=10), A041014 (m=11), A041016 (m=12), ..., A042934 (m=999), A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[8],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011*)
    CoefficientList[Series[(2 + 3*x + 2*x^2 - x^3)/(1 - 6*x^2 + x^4), {x, 0, 30}], x]  (* Vincenzo Librandi, Oct 28 2013 *)
    a0[n_] := -((3-2*Sqrt[2])^n*(1+Sqrt[2]))+(-1+Sqrt[2])*(3+2*Sqrt[2])^n // Simplify
    a1[n_] := ((3-2*Sqrt[2])^n+(3+2*Sqrt[2])^n)/2 // Simplify
    Flatten[MapIndexed[{a0[#], a1[#]} &,Range[20]]] (* Gerry Martens, Jul 11 2015 *)
  • PARI
    A041010=contfracpnqn(c=contfrac(sqrt(8)),#c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041010[n+1]! For more terms use:
    A041010(n)={n<#A041010|| A041010=extend(A041010, [-1,0,6,0]~, n\.8); A041010[n+1]}
    extend(A,c,N)={for(n=#A+1,#A=Vec(A,N), A[n]=A[n-#c..n-1]*c);A} \\ (End)

Formula

a(n) = 6*a(n-2) - a(n-4).
a(2n) = a(2n-1) + a(2n-2), a(2n+1) = 4*a(2n) + a(2n-1).
a(2n) = A001333(2n), a(2n+1) = 2*A001333(2n+1).
G.f.: (2+3*x+2*x^2-x^3)/(1-6*x^2+x^4).
a(n) = A001333(n+1)*A000034(n+1). - R. J. Mathar, Jul 08 2009
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*(1+sqrt(2))) + (-1+sqrt(2))*(3+2*sqrt(2))^n.
a1(n) = ((3-2*sqrt(2))^n + (3+2*sqrt(2))^n)/2. (End)

Extensions

Entry improved by Michael Somos
Initial term 1 removed and b-file, program and formulas adapted by Georg Fischer, Jul 01 2019
Cross-references added by M. F. Hasler, Nov 02 2019

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

A266698 x-values of solutions to the Diophantine equation x^2 - 7*y^2 = 2.

Original entry on oeis.org

3, 45, 717, 11427, 182115, 2902413, 46256493, 737201475, 11748967107, 187246272237, 2984191388685, 47559815946723, 757972863758883, 12080006004195405, 192522123203367597, 3068273965249686147, 48899861320791610755, 779329507167416085933, 12420372253357865764173, 197946626546558436140835
Offset: 1

Views

Author

Sture Sjöstedt, Jan 03 2016

Keywords

Comments

A159678 gives the y-values of solutions to the Diophantine equation x^2 - 7*y^2 = 2.

Crossrefs

Programs

  • Magma
    [n: n in [1..2*10^7] | IsSquare((n^2-2)/7)]; // Vincenzo Librandi, Jan 06 2016
    
  • Mathematica
    LinearRecurrence[{16,-1}, {3, 45}, 20 ]
  • PARI
    lista(nn) = {print1(x = 3, ", "); print1(y = 45, ", "); for (n=2, nn, z = 16*y - x; print1(z, ", "); x = y; y = z;);} \\ Michel Marcus, Jan 05 2016
    
  • SageMath
    [3*(chebyshev_U(n-1, 8) - chebyshev_U(n-2, 8)) for n in (1..30)] # G. C. Greubel, Jun 25 2022

Formula

a(1)=3, a(2)=45, a(n) = 16*a(n-1) - a(n-2).
a(n) = A041008(4n-2). - Robert Israel, Jan 05 2016
From R. J. Mathar, Jan 12 2016: (Start)
G.f.: 3*x*(1-x) / ( 1-16*x+x^2 ).
a(n) = 3*A157456(n). (End)
From G. C. Greubel, Jun 25 2022: (Start)
a(n) = 3*(ChebyshevU(n-1, 8) - ChebyshevU(n-2, 8)).
E.g.f.: exp(8*x)*(3*cosh(3*sqrt(7)*x) - sqrt(7)*sinh(3*sqrt(7)*x)) - 3. (End)

A259596 Denominators of the other-side convergents to sqrt(7).

Original entry on oeis.org

1, 2, 3, 5, 17, 31, 48, 79, 271, 494, 765, 1259, 4319, 7873, 12192, 20065, 68833, 125474, 194307, 319781, 1097009, 1999711, 3096720, 5096431, 17483311, 31869902, 49353213, 81223115, 278635967, 507918721, 786554688, 1294473409, 4440692161, 8094829634
Offset: 0

Views

Author

Clark Kimberling, Jul 20 2015

Keywords

Comments

Suppose that a positive irrational number r has continued fraction [a(0), a(1), ... ]. Define sequences p(i), q(i), P(i), Q(i) from the numerators and denominators of finite continued fractions as follows:
p(i)/q(i) = [a(0), a(1), ... a(i)] and P(i)/Q(i) = [a(0), a(1), ..., a(i) + 1]. The fractions p(i)/q(i) are the convergents to r, and the fractions P(i)/Q(i) are introduced here as the "other-side convergents" to
r, because p(2k)/q(2k) < r < P(2k)/Q(2k) and P(2k+1)/Q(2k+1) < r < p(2k+1)/q(2k+1), for k >= 0. The closeness of P(i)/Q(i) to r is indicated by |r - P(i)/Q(i)| < |p(i)/q(i) - P(i)/Q(i)| = 1/(q(i)Q(i)), for i >= 0.

Examples

			For r = sqrt(7), 3, 5/2, 8/3, 13/5, 45/17, 82/31, 127/48. A comparison of convergents with other-side convergents:
i    p(i)/q(i)         P(i)/Q(i)    p(i)*Q(i)-P(i)*q(i)
0    2/1   < sqrt(7) <    3/1               -1
1    3/1   > sqrt(7) >    5/2                1
2    5/2   < sqrt(7) <    8/3               -1
3    8/3   > sqrt(7) >   13/5                1
4    37/14 < sqrt(7) <   45/17              -1
5    45/17 > sqrt(7) >   83/31               1
		

Crossrefs

Cf. A041008, A041009, A259597 (numerators).

Programs

  • Mathematica
    r = Sqrt[7]; a[i_] := Take[ContinuedFraction[r, 35], i];
    b[i_] := ReplacePart[a[i], i -> Last[a[i]] + 1];
    t = Table[FromContinuedFraction[b[i]], {i, 1, 35}]
    u = Denominator[t]
    LinearRecurrence[{0,0,0,16,0,0,0,-1},{1,2,3,5,17,31,48,79},40] (* Harvey P. Dale, Jun 03 2017 *)
  • PARI
    Vec(-(x+1)*(x^2-x-1)*(x^4+3*x^2+1)/(x^8-16*x^4+1) + O(x^50)) \\ Colin Barker, Jul 21 2015

Formula

p(i)*Q(i) - P(i)*q(i) = (-1)^(i+1), for i >= 0, where a(i) = Q(i).
a(n) = 16*a(n-4) - a(n-8) for n>7. - Colin Barker, Jul 21 2015
G.f.: -(x+1)*(x^2-x-1)*(x^4+3*x^2+1) / (x^8-16*x^4+1). - Colin Barker, Jul 21 2015

A259597 Numerators of the other-side convergents to sqrt(7).

Original entry on oeis.org

3, 5, 8, 13, 45, 82, 127, 209, 717, 1307, 2024, 3331, 11427, 20830, 32257, 53087, 182115, 331973, 514088, 846061, 2902413, 5290738, 8193151, 13483889, 46256493, 84319835, 130576328, 214896163, 737201475, 1343826622, 2081028097, 3424854719, 11748967107
Offset: 0

Views

Author

Clark Kimberling, Jul 20 2015

Keywords

Comments

Suppose that a positive irrational number r has continued fraction [a(0), a(1), ... ]. Define sequences p(i), q(i), P(i), Q(i) from the numerators and denominators of finite continued fractions as follows:
p(i)/q(i) = [a(0), a(1), ... a(i)] and P(i)/Q(i) = [a(0), a(1), ..., a(i) + 1]. The fractions p(i)/q(i) are the convergents to r, and the fractions P(i)/Q(i) are introduced here as the "other-side convergents" to
r, because p(2k)/q(2k) < r < P(2k)/Q(2k) and P(2k+1)/Q(2k+1) < r < p(2k+1)/q(2k+1), for k >= 0. The closeness of P(i)/Q(i) to r is indicated by |r - P(i)/Q(i)| < |p(i)/q(i) - P(i)/Q(i)| = 1/(q(i)Q(i)), for i >= 0.

Examples

			For r = sqrt(7), 3, 5/2, 8/3, 13/5, 45/17, 82/31, 127/48. A comparison of convergents with other-side convergents:
i  p(i)/q(i)            P(i)/Q(i)    p(i)*Q(i)-P(i)*q(i)
0     2/1   < sqrt(7) <    3/1               -1
1     3/1   > sqrt(7) >    5/2                1
2     5/2   < sqrt(7) <    8/3               -1
3     8/3   > sqrt(7) >   13/5                1
4     37/14 < sqrt(7) <   45/17              -1
5     45/17 > sqrt(7) >   83/31               1
		

Crossrefs

Cf. A041008, A041009, A259596 (denominators).

Programs

  • Mathematica
    r = Sqrt[7]; a[i_] := Take[ContinuedFraction[r, 35], i];
    b[i_] := ReplacePart[a[i], i -> Last[a[i]] + 1];
    t = Table[FromContinuedFraction[b[i]], {i, 1, 35}]
    v = Numerator[t]
    LinearRecurrence[{0,0,0,16,0,0,0,-1},{3,5,8,13,45,82,127,209},40] (* Harvey P. Dale, Jan 15 2017 *)
  • PARI
    Vec((x^7-x^6+2*x^5-3*x^4+13*x^3+8*x^2+5*x+3)/(x^8-16*x^4+1) + O(x^50)) \\ Colin Barker, Jul 21 2015

Formula

p(i)*Q(i) - P(i)*q(i) = (-1)^(i+1), for i >= 0, where a(i) = Q(i).
a(n) = 16*a(n-4) - a(n-8) for n>7. - Colin Barker, Jul 21 2015
G.f.: (x^7-x^6+2*x^5-3*x^4+13*x^3+8*x^2+5*x+3) / (x^8-16*x^4+1). - Colin Barker, Jul 21 2015
Showing 1-10 of 10 results.