login
A107368
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-5).
1
0, 0, 1, 0, 1, 0, 1, 1, 2, 3, 4, 6, 8, 12, 17, 25, 36, 52, 75, 108, 156, 225, 325, 469, 677, 977, 1410, 2035, 2937, 4239, 6118, 8830, 12744, 18393, 26546, 38313, 55296, 79807, 115183, 166240, 239929, 346282, 499778, 721314, 1041050, 1502515, 2168533
OFFSET
0,9
COMMENTS
First differences of A107293. [Sep 28 2009]
FORMULA
G.f.: x^2*(-1+x)/(-1+x+x^2-x^3+x^5). [Sep 28 2009]
MATHEMATICA
M = {{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}, {1, 0, -1, 1, 1}} fourss = Table[Abs[MatrixPower[M, i][[1, 4]]], {i, 1, 50}]
LinearRecurrence[{1, 1, -1, 0, 1}, {0, 0, 1, 0, 1}, 50] (* Harvey P. Dale, Nov 05 2011 *)
PROG
(Magma) I:=[0, 0, 1, 0, 1]; [n le 5 select I[n] else Self(n-1)+Self(n-2)-Self(n-3)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Nov 16 2011
CROSSREFS
Sequence in context: A018438 A342338 A221942 * A074733 A001461 A048597
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jun 08 2005
EXTENSIONS
Definition replaced by recurrence by the Associate Editors of the OEIS, Sep 28 2009
STATUS
approved