login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165458 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)