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

A010121 Continued fraction for sqrt(7).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is a basic member of a family of 4-periodic multiplicative sequences with two parameters (c1,c2), defined for n >= 1 by a(n)=1 if n is odd, a(n)=c1 if n == 0 (mod 4) and a(n)=c2 if n == 2 (mod 4). Here, (c1,c2)=(4,1).
The Dirichlet generating function is (1+(c2-1)/2^s+(c1-c2)/4^s)*zeta(s).
Other members are A010123 with parameters (6,2), A010127 (8,3), A010130 (10,1), A010131 (10,2), A010132 (10,4), A010137 (12,5), A010146 (14,6), A089146 (4,8), A109008 (4,2), A112132 (7,3). If c1=c2, this reduces to the cases discussed in A040001. - R. J. Mathar, Feb 18 2011

Examples

			2.645751311064590590501615753...  = A010465 = 2 + 1/(1 + 1/(1 + 1/(1 + 1/(4 + ...)))).
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A010465 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sqrt[7],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    CoefficientList[Series[(2 x^2 + 3 x + 2) (x^2 - x + 1) / ((1 - x) (1 + x) (x^2 + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 26 2016 *)
    PadRight[{2},120,{4,1,1,1}] (* Harvey P. Dale, Nov 30 2019 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 13000); x=contfrac(sqrt(7)); for (n=0, 20000, write("b010121.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009

Formula

From R. J. Mathar, Jun 17 2009: (Start)
G.f.: -(2*x^2+3*x+2)*(x^2-x+1)/((x-1)*(1+x)*(x^2+1)).
a(n) = a(n-4), n > 4. (End)
a(n) = (7 + 3*(-1)^n + 3*(-i)^n + 3*i^n)/4, n > 0, where i is the imaginary unit. - Bruno Berselli, Feb 18 2011

A010515 Decimal expansion of square root of 62.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Sqrt(62) = 787400 * Sum_{n>=0} (A001790(n)/2^A005187(floor(n/2)) * 10^(-6n-5)) where A001790(n) are numerators in expansion of 1/sqrt(1-x) and the denominators in expansion of 1/sqrt(1-x) are 2^A005187(n). 786400 = 62*12700, see A020819 (expansion of 1/sqrt(62)). - Gerald McGarvey, Jan 01 2005
Continued fraction expansion is 7 followed by {1, 6, 1, 14} repeated. - Harry J. Smith, Jun 07 2009

Examples

			7.874007874011811019685034448812007863681086122020853794598842550313760...
		

Crossrefs

Cf. A010146 Continued fraction.

Programs

  • Mathematica
    RealDigits[N[62^(1/2),200]][[1]] (* Vladimir Joseph Stephan Orlovsky, Jan 22 2012 *)
  • PARI
    { default(realprecision, 20080); x=sqrt(62); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b010515.txt", n, " ", d)); } \\ Harry J. Smith, Jun 07 2009

Extensions

Final digits of sequence corrected using the b-file. - N. J. A. Sloane, Aug 30 2009

A067280 Number of terms in continued fraction for sqrt(n), excl. 2nd and higher periods.

Original entry on oeis.org

1, 2, 3, 1, 2, 3, 5, 3, 1, 2, 3, 3, 6, 5, 3, 1, 2, 3, 7, 3, 7, 7, 5, 3, 1, 2, 3, 5, 6, 3, 9, 5, 5, 5, 3, 1, 2, 3, 3, 3, 4, 3, 11, 9, 7, 13, 5, 3, 1, 2, 3, 7, 6, 7, 5, 3, 7, 8, 7, 5, 12, 5, 3, 1, 2, 3, 11, 3, 9, 7, 9, 3, 8, 6, 5, 13, 7, 5, 5, 3, 1, 2, 3, 3, 6, 11, 3, 7, 6, 3, 9, 9, 11, 17, 5, 5, 12, 5
Offset: 1

Views

Author

Frank Ellermann, Feb 23 2002

Keywords

Examples

			a(2)=2: [1,(2)+ ]; a(3)=3: [1,(1,2)+ ]; a(4)=1: [2]; a(5)=2: [2,(4)+ ].
		

References

  • H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th edition, 1999, table 1.

Crossrefs

Related sequences: 2 : A040000, ..., 44: A040037, 48: A040041, ..., 51: A040043, 56: A040048, 60: A040052, 63: A040055, ..., 66: A040057. 68: A040059, 72: A040063, 80: A040071.
Related sequences: 45: A010135, ..., 47: A010137, 52: A010138, ..., 55: A010141, 57: A010142, ..., 59: A010144. 61: A010145, 62: A010146. 67: A010147, 69: A010148, ..., 71: A010150.
Cf. A003285.

Programs

  • Python
    from sympy import continued_fraction_periodic
    def A067280(n): return len((a := continued_fraction_periodic(0,1,n))[:1]+(a[1] if a[1:] else [])) # Chai Wah Wu, Jun 14 2022

Formula

a(n) = A003285(n) + 1. - Andrey Zabolotskiy, Jun 23 2020

Extensions

Name clarified by Michel Marcus, Jun 22 2020

A041109 Denominators of continued fraction convergents to sqrt(62).

Original entry on oeis.org

1, 1, 7, 8, 119, 127, 881, 1008, 14993, 16001, 110999, 127000, 1888999, 2015999, 13984993, 16000992, 237998881, 253999873, 1761998119, 2015997992, 29985970007, 32001967999, 221997778001, 253999746000, 3777994222001, 4031993968001, 27969958030007
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1, 1, 7, 8, 119, 127, 881, 1008]; [n le 8 select I[n] else 126*Self(n-4)-Self(n-8): n in [1..40]]; // Vincenzo Librandi, Dec 11 2013
  • Mathematica
    Denominator[Convergents[Sqrt[62], 30]] (* Vincenzo Librandi, Dec 11 2013 *)
    LinearRecurrence[{0,0,0,126,0,0,0,-1},{1,1,7,8,119,127,881,1008},30] (* Harvey P. Dale, Oct 26 2016 *)

Formula

G.f.: -(x^2-x-1)*(x^4+8*x^2+1) / (x^8-126*x^4+1). - Colin Barker, Nov 12 2013
a(n) = 126*a(n-4) - a(n-8). - Vincenzo Librandi, Dec 11 2013

Extensions

More terms from Colin Barker, Nov 12 2013
Showing 1-4 of 4 results.