OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1,2).
FORMULA
G.f.: x*(1+2*x^2) / ( (1-2*x)*(1+x)*(1-x+x^2) ). - R. J. Mathar, May 27 2011
From Paul Curtz, May 27 2011: (Start)
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4).
a(n)+a(n+3) = 3*2^(n+1) = A007283(n+1).
a(n+6)-a(n) = 21*2^(n+1) = A175805(n+1).
(End)
MATHEMATICA
CoefficientList[Series[(1 + 2 x^2) / ((1 - 2 x) (1 + x) (1 - x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 08 2016 *)
LinearRecurrence[{2, 0, -1, 2}, {1, 2, 6, 11}, 40] (* Harvey P. Dale, Jan 30 2024 *)
PROG
(Magma) I:=[1, 2, 6, 11]; [n le 4 select I[n] else 2*Self(n-1)-Self(n-3)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 08 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David Applegate, Aug 22 2003
STATUS
approved