login
a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = a(1) = 1, a(2) = 0.
2

%I #23 Sep 08 2022 08:46:06

%S 1,1,0,0,2,3,3,5,10,16,24,39,65,105,168,272,442,715,1155,1869,3026,

%T 4896,7920,12815,20737,33553,54288,87840,142130,229971,372099,602069,

%U 974170,1576240,2550408,4126647,6677057,10803705,17480760,28284464,45765226,74049691

%N a(n) = a(n-1) + a(n-2) + a(n-3), with a(0) = a(1) = 1, a(2) = 0.

%H Harvey P. Dale, <a href="/A236165/b236165.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,1).

%F G.f.: (1 - x^2 - x^3) / (1 - x - x^3 - x^4).

%F a(n+1)*a(n+3) = a(n)*a(n+2) + a(n+1)*a(n+2) for all n in Z.

%F a(n+1) + a(n-1) = A000045(n) for all n in Z.

%F a(2n) = A059929(n-1), a(2n-1) = A226205(n).

%e G.f. = 1 + x + 2*x^4 + 3*x^5 + 3*x^6 + 5*x^7 + 10*x^8 + 16*x^9 + ...

%t a[ n_] := Fibonacci[ Quotient[ n, 2] - 1] Fibonacci[ Quotient[ n, 2] + 1 + Mod[n, 2]];

%t LinearRecurrence[{1,0,1,1},{1,1,0,0},50] (* _Harvey P. Dale_, Jan 19 2015 *)

%t CoefficientList[Series[(1 - x^2 - x^3) / (1 - x - x^3 - x^4), {x, 0, 70}], x] (* _Vincenzo Librandi_, Jan 20 2015 *)

%o (PARI) {a(n) = fibonacci( n\2 - 1 ) * fibonacci( n\2 + 1 + n%2 )};

%o (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

%Y Cf. A000045, A059929, A226205.

%K nonn,easy

%O 0,5

%A _Michael Somos_, Jan 19 2014