OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..199 [1 removed by Georg Fischer, Jul 01 2019]
Index entries for linear recurrences with constant coefficients, signature (0,6,0,-1).
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).
G.f.: (2+3*x+2*x^2-x^3)/(1-6*x^2+x^4).
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)
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 *)
PROG
From M. F. Hasler, Nov 01 2019: (Start)
(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:
extend(A, c, N)={for(n=#A+1, #A=Vec(A, N), A[n]=A[n-#c..n-1]*c); A} \\ (End)
CROSSREFS
KEYWORD
nonn,cofr,frac,easy
AUTHOR
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
STATUS
approved