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!)
A122038 a(n) = 1*3^(3*n) + 2*3^(2*n) - 3*3^(1*n). 1

%I #12 Sep 08 2022 08:45:27

%S 36,864,21060,544320,14466276,388481184,10469912580,282515610240,

%T 7626372266916,205898105486304,5559123328143300,150095200154477760,

%U 4052560236745849956,109419034885082920224,2954313118333054841220

%N a(n) = 1*3^(3*n) + 2*3^(2*n) - 3*3^(1*n).

%H G. C. Greubel, <a href="/A122038/b122038.txt">Table of n, a(n) for n = 1..690</a>

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

%F a(n) = 3^(3*n) + 2*3^(2*n) - 3^(n+1) = (3^(n-1) + 1)*(3^n-1)*3^(n+1).

%F From _G. C. Greubel_, Oct 04 2019: (Start)

%F G.f.: 36*x*(1-15*x)/((1-3*x)*(1-9*x)*(1-27*x)).

%F E.g.f.: exp(27*x) + 2*exp(9*x) - 3*exp(3*x). (End)

%p A122038:=n->1*3^(3*n)+2*3^(2*n)-3*3^(1*n): seq(A122038(n), n=1..20); # _Wesley Ivan Hurt_, Apr 23 2017

%t LinearRecurrence[{39,-351,729}, {36,864,21060}, 20] (* _G. C. Greubel_, Oct 04 2019 *)

%t CoefficientList[Series[36x (1-15x)/((1-3x)(1-9x)(1-27x)),{x,0,20}],x] (* _Harvey P. Dale_, Aug 16 2021 *)

%o (PARI) for(n=1,20,print1(3^(3*n)+2*3^(2*n)-3^(n+1),","))

%o (Magma) I:=[36,864,21060]; [n le 3 select I[n] else 39*Self(n-1) - 351*Self(n-2) +729*Self(n-3): n in [1..20]]; // _G. C. Greubel_, Oct 04 2019

%o (Sage)

%o def A122038_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P( 36*x*(1-15*x)/((1-3*x)*(1-9*x)*(1-27*x)) ).list()

%o a=A122038_list(20); a[1:] # _G. C. Greubel_, Oct 04 2019

%o (GAP) a:=[36,864,21060];; for n in [4..20] do a[n]:=39*a[n-1] -351*a[n-2] +729a[n-3]; od; a; # _G. C. Greubel_, Oct 04 2019

%Y Cf. A122041.

%K nonn,easy

%O 1,1

%A Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 14 2006

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 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)