|
|
|
|
2, 4, 8, 18, 42, 100, 240, 578, 1394, 3364, 8120, 19602, 47322, 114244, 275808, 665858, 1607522, 3880900, 9369320, 22619538, 54608394, 131836324, 318281040, 768398402, 1855077842, 4478554084, 10812186008, 26102926098, 63018038202, 152139002500, 367296043200, 886731088898, 2140758220994, 5168247530884
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 2*(1 - x - x^2) / ((1 - x)*(1 - 2*x - x^2)).
a(n) = (2 + (1-sqrt(2))^(1+n) + (1+sqrt(2))^(1+n)) / 2.
a(n) = 3*a(n-1) - a(n-2) - a(n-3) for n>2.
(End)
|
|
PROG
|
(PARI) Vec(2*(1 - x - x^2) / ((1 - x)*(1 - 2*x - x^2)) + O(x^40)) \\ Colin Barker, May 26 2018
(Magma) a:=[2, 4, 8]; [n le 3 select a[n] else 3*Self(n-1) - Self(n-2) - Self(n-3):n in [1..35]]; // Marius A. Burtea, Sep 29 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|