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!)
A099783 a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k)*3^(n-2*k). 6
1, 3, 9, 30, 108, 405, 1548, 5967, 23085, 89451, 346842, 1345248, 5218263, 20242872, 78528609, 304640595, 1181814705, 4584708702, 17785841652, 68998115709, 267670245492, 1038395956527, 4028337876861, 15627474388899, 60624993311226 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
In general a(n) = Sum_{k=0..floor(n/3)} C(n-k,2*k) * u^k * v^(n-3*k) has g.f. (1-v*x)/((1-v*x)^2 - u*x^2) and satisfies the recurrence a(n) = 2*u*v*a(n-1) - v^2*a(n-2) + u*a(n-3).
LINKS
FORMULA
G.f.: (1-3*x)/((1-3*x)^2 - 3*x^3).
a(n) = 6*a(n-1) - 9*a(n-2) + 3*a(n-3).
MAPLE
seq(coeff(series((1-3*x)/((1-3*x)^2 - 3*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
MATHEMATICA
LinearRecurrence[{6, -9, 3}, {1, 3, 9}, 30] (* G. C. Greubel, Sep 04 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-3*x)/((1-3*x)^2 - 3*x^3)) \\ G. C. Greubel, Sep 04 2019
(Magma) I:=[1, 3, 9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 3*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
(Sage)
def A099783_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-3*x)/((1-3*x)^2 - 3*x^3)).list()
A099783_list(30) # G. C. Greubel, Sep 04 2019
(GAP) a:=[1, 3, 9];; for n in [4..30] do a[n]:=6*a[n-1]-9*a[n-2]+3*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
CROSSREFS
Sequence in context: A053022 A369440 A128725 * A200074 A032125 A246472
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 26 2004
STATUS
approved

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 09:38 EDT 2024. Contains 371967 sequences. (Running on oeis4.)