|
|
|
|
1, 2, 6, 11, 22, 42, 85, 170, 342, 683, 1366, 2730, 5461, 10922, 21846, 43691, 87382, 174762, 349525, 699050, 1398102, 2796203, 5592406, 11184810, 22369621, 44739242, 89478486, 178956971, 357913942, 715827882, 1431655765, 2863311530, 5726623062
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1+2*x^2) / ( (1-2*x)*(1+x)*(1-x+x^2) ). - R. J. Mathar, May 27 2011
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
|
|
|
STATUS
|
approved
|
|
|
|