A236165 a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = a(1) = 1, a(2) = 0.
1, 1, 0, 0, 2, 3, 3, 5, 10, 16, 24, 39, 65, 105, 168, 272, 442, 715, 1155, 1869, 3026, 4896, 7920, 12815, 20737, 33553, 54288, 87840, 142130, 229971, 372099, 602069, 974170, 1576240, 2550408, 4126647, 6677057, 10803705, 17480760, 28284464, 45765226, 74049691
Offset: 0
Examples
G.f. = 1 + x + 2*x^4 + 3*x^5 + 3*x^6 + 5*x^7 + 10*x^8 + 16*x^9 + ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,1).
Programs
-
Magma
I:=[1,1,0,0]; [n le 4 select I[n] else Self(n-1)+Self(n-3)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 20 2015
-
Mathematica
a[ n_] := Fibonacci[ Quotient[ n, 2] - 1] Fibonacci[ Quotient[ n, 2] + 1 + Mod[n, 2]]; LinearRecurrence[{1,0,1,1},{1,1,0,0},50] (* Harvey P. Dale, Jan 19 2015 *) CoefficientList[Series[(1 - x^2 - x^3) / (1 - x - x^3 - x^4), {x, 0, 70}], x] (* Vincenzo Librandi, Jan 20 2015 *)
-
PARI
{a(n) = fibonacci( n\2 - 1 ) * fibonacci( n\2 + 1 + n%2 )};