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.

A019430 Continued fraction for tan(1/7).

Original entry on oeis.org

0, 6, 1, 19, 1, 33, 1, 47, 1, 61, 1, 75, 1, 89, 1, 103, 1, 117, 1, 131, 1, 145, 1, 159, 1, 173, 1, 187, 1, 201, 1, 215, 1, 229, 1, 243, 1, 257, 1, 271, 1, 285, 1, 299, 1, 313, 1, 327, 1, 341, 1, 355, 1, 369, 1, 383, 1, 397, 1, 411, 1, 425, 1, 439, 1, 453, 1, 467, 1, 481, 1, 495, 1, 509, 1
Offset: 0

Views

Author

Keywords

Examples

			0.14383695943619093528003059... = 0 + 1/(6 + 1/(1 + 1/(19 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 14 2009
		

Crossrefs

Cf. A161016 (decimal expansion), A019425 through A019433.

Programs

  • Magma
    [0, 6] cat [(-1+3*(-1)^n-7*(-1+(-1)^n)*n)/2: n in [2..80]]; // Vincenzo Librandi, Jan 03 2016
  • Mathematica
    Block[{$MaxExtraPrecision=1000},ContinuedFraction[Tan[1/7],80]] (* Harvey P. Dale, Feb 01 2013 *)
    Join[{0, 6}, LinearRecurrence[{0, 2, 0, -1}, {1, 19, 1, 33}, 100]] (* Vincenzo Librandi, Jan 03 2016 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 96000); x=contfrac(tan(1/7)); for (n=0, 20000, write("b019430.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 14 2009
    
  • PARI
    Vec(x*(x^4-x^3+7*x^2+x+6)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Sep 08 2013
    

Formula

From Colin Barker, Sep 08 2013: (Start)
a(n) = (-1+3*(-1)^n-7*(-1+(-1)^n)*n)/2 for n>1.
a(n) = 2*a(n-2)-a(n-4) for n>5.
G.f.: x*(x^4-x^3+7*x^2+x+6) / ((x-1)^2*(x+1)^2). (End)