|
|
|
|
0, 4, 6, 12, 20, 34, 56, 92, 150, 244, 396, 642, 1040, 1684, 2726, 4412, 7140, 11554, 18696, 30252, 48950, 79204, 128156, 207362, 335520, 542884, 878406, 1421292, 2299700, 3720994, 6020696, 9741692, 15762390, 25504084, 41266476, 66770562, 108037040
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
This sequence has a golden mean ratio limit.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2*a(n-1) - a(n-3). [Dec 03 2009]
G.f.: 2*x*(2 - x)/((1-x)*(1 -x -x^2)). [Dec 03 2009]
|
|
MATHEMATICA
|
M = {{0, 1}, {1, 1}} v[0] = {0, 1}; v[n_] := v[n] = M.v[n - 1] + {3, 2} a = Table[v[n][[1]], {n, 0, 30}]
RecurrenceTable[{a[0] == 0, a[1] == 4, a[2] == 6, a[n] == 2 a[n-1] - a[n-3]}, a, {n, 50}] (* Vincenzo Librandi, Jul 30 2016 *)
|
|
PROG
|
(Magma) I:=[0, 4, 6]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 30 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Definition simplified and notation in formulas set to OEIS standards by the Assoc. Editors of the OEIS, Dec 03 2009
|
|
STATUS
|
approved
|
|
|
|