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”).
%I #25 Jan 01 2024 23:50:42
%S 1,4,14,41,122,364,1093,3280,9842,29525,88574,265720,797161,2391484,
%T 7174454,21523361,64570082,193710244,581130733,1743392200,5230176602,
%U 15690529805,47071589414,141214768240,423644304721
%N a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4).
%H Paolo Xausa, <a href="/A132357/b132357.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 (3,0,-1,3).
%F O.g.f.: -(1+x+2*x^2)/((3*x-1)*(x+1)*(x^2-x+1)) = -(3/2)/(3*x-1)+(1/3)*(x-2)/(x^2-x+1)+(1/ 6)/(x+1). - _R. J. Mathar_, Nov 28 2007
%F a(n) = (1/2)*3^(n+1) + (1/6)*(-1)^n - (2/3)*cos(Pi*n/3). Or, a(n) = (1/2)*3^(n+1) + (1/2)*[ -1; -1; 1; 1; 1; -1]. - _Richard Choulet_, Jan 02 2008
%F a(n+1) - 3a(n) = A132367(n+1). - _Paul Curtz_, Dec 02 2007
%F 6*a(n) = (-1)^n +3^(n+2) -2*A057079(n+1). - _R. J. Mathar_, Oct 03 2021
%t LinearRecurrence[{3,0,-1,3},{1,4,14,41},50] (* _Paolo Xausa_, Dec 05 2023 *)
%o (PARI) a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 3,-1,0,3]^n*[1;4;14;41])[1,1] \\ _Charles R Greathouse IV_, Oct 08 2016
%Y First differences of A132353.
%Y Cf. A129339.
%K nonn,easy
%O 0,2
%A _Paul Curtz_, Nov 24 2007