A293014 a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) for n > 4, where a(n)=0 for n < 4 and a(4) = 1.
0, 0, 0, 0, 1, 1, 2, 2, 4, 6, 11, 17, 28, 44, 72, 116, 189, 305, 494, 798, 1292, 2090, 3383, 5473, 8856, 14328, 23184, 37512, 60697, 98209, 158906, 257114, 416020, 673134, 1089155, 1762289, 2851444, 4613732, 7465176, 12078908
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,1).
Programs
-
Mathematica
LinearRecurrence[{1, 1, -1, 1, 1}, {0, 0, 0, 0, 1}, 40]
-
PARI
a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,1,-1,1,1]^n)[1,5] \\ Charles R Greathouse IV, Sep 28 2017
Formula
G.f.: x^4/(1 - x - x^2 + x^3 - x^4 - x^5).
Comments