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.

A019431 Continued fraction for tan(1/8).

This page as a plain text file.
%I A019431 #36 Jul 15 2025 10:47:48
%S A019431 0,7,1,22,1,38,1,54,1,70,1,86,1,102,1,118,1,134,1,150,1,166,1,182,1,
%T A019431 198,1,214,1,230,1,246,1,262,1,278,1,294,1,310,1,326,1,342,1,358,1,
%U A019431 374,1,390,1,406,1,422,1,438,1,454,1,470,1,486,1,502,1,518,1,534,1,550,1,566,1,582
%N A019431 Continued fraction for tan(1/8).
%H A019431 Harry J. Smith, <a href="/A019431/b019431.txt">Table of n, a(n) for n = 0..20000</a>
%H A019431 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>
%H A019431 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F A019431 From _Colin Barker_, Sep 08 2013: (Start)
%F A019431 a(n) = (-1+3*(-1)^n-8*(-1+(-1)^n)*n)/2 for n>1.
%F A019431 a(n) = 2*a(n-2)-a(n-4) for n>5.
%F A019431 G.f.: x*(x^4-x^3+8*x^2+x+7) / ((x-1)^2*(x+1)^2). (End)
%e A019431 0.12565513657513096779267821... = 0 + 1/(7 + 1/(1 + 1/(22 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 14 2009
%t A019431 Join[{0, 7}, LinearRecurrence[{0, 2, 0, -1}, {1, 22, 1, 38}, 100]] (* _Vincenzo Librandi_, Jan 03 2016 *)
%t A019431 Block[{$MaxExtraPrecision=1000}, ContinuedFraction[Tan[1/8],100]] (* _Harvey P. Dale_, Jul 14 2025 *)
%o A019431 (PARI) { allocatemem(932245000); default(realprecision, 97000); x=contfrac(tan(1/8)); for (n=0, 20000, write("b019431.txt", n, " ", x[n+1])); } \\ _Harry J. Smith_, Jun 14 2009
%o A019431 (PARI) Vec(x*(x^4-x^3+8*x^2+x+7)/((x-1)^2*(x+1)^2) + O(x^100)) \\ _Colin Barker_, Sep 08 2013
%o A019431 (Magma) [0,7] cat [(-1+3*(-1)^n-8*(-1+(-1)^n)*n)/2: n in [2..80]]; // _Vincenzo Librandi_, Jan 03 2016
%Y A019431 Cf. A161017 (decimal expansion), A019425 through A019433.
%K A019431 nonn,cofr,easy
%O A019431 0,2
%A A019431 _David W. Wilson_