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(0)=1, a(1)=4, a(n) = 12*a(n-2) - a(n-1).
2

%I #20 Sep 08 2022 08:45:47

%S 1,4,8,40,56,424,248,4840,-1864,59944,-82312,801640,-1789384,11409064,

%T -32881672,169790440,-564370504,2601855784,-9374301832,40596571240,

%U -153088193224,640247048104,-2477305366792,10160269944040,-39887934345544,161811173674024

%N a(0)=1, a(1)=4, a(n) = 12*a(n-2) - a(n-1).

%C a(n)/a(n-1) tends to -4.

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

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

%F G.f.: (1+5*x)/(1+x-12*x^2).

%F a(n) = Sum_{k, k=0..n} A112555(n,k)*3^k.

%F a(n) = (8*3^n-(-4)^n)/7. - _Klaus Brockhaus_, Sep 26 2009

%F E.g.f.: (8*exp(3*x) - exp(-4*x))/7. - _G. C. Greubel_, Oct 20 2018

%p A165458:=n->(8*3^n-(-4)^n)/7: seq(A165458(n), n=0..40); # _Wesley Ivan Hurt_, May 26 2015

%t LinearRecurrence[{-1,12},{1,4},30] (* _Harvey P. Dale_, Dec 26 2015 *)

%o (PARI) vector(40, n, n--; (8*3^n-(-4)^n)/7) \\ _G. C. Greubel_, Oct 20 2018

%o (Magma) [(8*3^n-(-4)^n)/7: n in [0..40]]; // _G. C. Greubel_, Oct 20 2018

%o (Python) for n in range(0, 30): print(int((8*3**n-(-4)**n)/7), end=', ') # _Stefano Spezia_, Oct 21 2018

%o (GAP) a:=[1,4];; for n in [3..27] do a[n]:=12*a[n-2]-a[n-1]; od; a; # _Muniru A Asiru_, Oct 21 2018

%K easy,sign

%O 0,2

%A _Philippe Deléham_, Sep 20 2009