OFFSET
0,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..20000
G. Xiao, Contfrac
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
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)
EXAMPLE
0.14383695943619093528003059... = 0 + 1/(6 + 1/(1 + 1/(19 + 1/(1 + ...)))). - Harry J. Smith, Jun 14 2009
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 *)
PROG
(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
(Magma) [0, 6] cat [(-1+3*(-1)^n-7*(-1+(-1)^n)*n)/2: n in [2..80]]; // Vincenzo Librandi, Jan 03 2016
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
STATUS
approved