cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A122038 #12 Sep 08 2022 08:45:27
%S A122038 36,864,21060,544320,14466276,388481184,10469912580,282515610240,
%T A122038 7626372266916,205898105486304,5559123328143300,150095200154477760,
%U A122038 4052560236745849956,109419034885082920224,2954313118333054841220
%N A122038 a(n) = 1*3^(3*n) + 2*3^(2*n) - 3*3^(1*n).
%H A122038 G. C. Greubel, <a href="/A122038/b122038.txt">Table of n, a(n) for n = 1..690</a>
%H A122038 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (39,-351,729).
%F A122038 a(n) = 3^(3*n) + 2*3^(2*n) - 3^(n+1) = (3^(n-1) + 1)*(3^n-1)*3^(n+1).
%F A122038 From _G. C. Greubel_, Oct 04 2019: (Start)
%F A122038 G.f.: 36*x*(1-15*x)/((1-3*x)*(1-9*x)*(1-27*x)).
%F A122038 E.g.f.: exp(27*x) + 2*exp(9*x) - 3*exp(3*x). (End)
%p A122038 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 A122038 LinearRecurrence[{39,-351,729}, {36,864,21060}, 20] (* _G. C. Greubel_, Oct 04 2019 *)
%t A122038 CoefficientList[Series[36x (1-15x)/((1-3x)(1-9x)(1-27x)),{x,0,20}],x] (* _Harvey P. Dale_, Aug 16 2021 *)
%o A122038 (PARI) for(n=1,20,print1(3^(3*n)+2*3^(2*n)-3^(n+1),","))
%o A122038 (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 A122038 (Sage)
%o A122038 def A122038_list(prec):
%o A122038     P.<x> = PowerSeriesRing(ZZ, prec)
%o A122038     return P( 36*x*(1-15*x)/((1-3*x)*(1-9*x)*(1-27*x)) ).list()
%o A122038 a=A122038_list(20); a[1:] # _G. C. Greubel_, Oct 04 2019
%o A122038 (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 A122038 Cf. A122041.
%K A122038 nonn,easy
%O A122038 1,1
%A A122038 Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 14 2006