login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 3*a(n-1) - 4*a(n-3), with a(0)=1, a(1)=2, a(2)=4, a(3)=7.
2

%I #9 Apr 13 2021 01:36:36

%S 1,2,4,7,13,23,41,71,121,199,313,455,569,455,-455,-3641,-12743,-36409,

%T -94663,-233017,-553415,-1281593,-2912711,-6524473,-14447047,

%U -31690297,-68972999,-149130809,-320631239,-686001721,-1461481927,-3101920825,-6561755591,-13839339065

%N a(n) = 3*a(n-1) - 4*a(n-3), with a(0)=1, a(1)=2, a(2)=4, a(3)=7.

%H G. C. Greubel, <a href="/A136299/b136299.txt">Table of n, a(n) for n = 0..1000</a>

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

%F From _R. J. Mathar_, Apr 04 2008: (Start)

%F O.g.f.: (1 -x -2*x^2 -x^3)/((1+x)*(1-2*x)^2).

%F a(n) = (11*2^n + (-1)^n)/9 - A001787(n+1)/12 if n>0. (End)

%F From _G. C. Greubel_, Apr 12 2021: (Start)

%F a(n) = (2^(n-2)*(41-3*n) + (-1)^n)/9 - (1/4)*[n=0].

%F E.g.f.: (-9 + 4*exp(-x) + (41 - 6*x)*exp(2*x))/36. (End)

%t LinearRecurrence[{3,0,-4}, {1,2,4,7}, 41] (* _G. C. Greubel_, Apr 12 2021 *)

%o (Magma) [1] cat [(2^(n-2)*(41-3*n) + (-1)^n)/9: n in [1..40]]; // _G. C. Greubel_, Apr 12 2021

%o (Sage) [1]+[(2^(n-2)*(41-3*n) + (-1)^n)/9 for n in (1..40)] # _G. C. Greubel_, Apr 12 2021

%Y Cf. A001787, A051013.

%K sign,easy

%O 0,2

%A _Paul Curtz_, Mar 22 2008