The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A099780 a(n) = Sum_{k=0..floor(n/3)} C(n-k, 2*k) * 2^k*3^(n-3*k). 7
1, 3, 9, 29, 99, 351, 1273, 4677, 17307, 64295, 239361, 892125, 3327091, 12412143, 46313289, 172824629, 644952459, 2406919671, 8982595153, 33523198797, 125109675747, 466914455615, 1742546049561, 6503265548325, 24270507755131, 90578748694983, 338044453470369 (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 - 2*x^3).
a(n) = 6*a(n-1) - 9*a(n-2) + 2*a(n-3).
a(n) = A001834(n)/3 + 2^(n+1)/3. - R. J. Mathar, Sep 21 2012
a(n) = (2^(2+n) - (2-sqrt(3))^n*(-1+sqrt(3)) + (1+sqrt(3))*(2+sqrt(3))^n) / 6. - Colin Barker, Feb 05 2017
E.g.f.: (1/3)*exp(2*x)*(2 + cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - Stefano Spezia, Sep 04 2019
MAPLE
seq(coeff(series((1-3*x)/((1-3*x)^2 -2*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Sep 04 2019
MATHEMATICA
LinearRecurrence[{6, -9, 2}, {1, 3, 9}, 30] (* Harvey P. Dale, Nov 30 2015 *)
PROG
(PARI) Vec((1-3*x) / ((1-3*x)^2-2*x^3) + O(x^30)) \\ Colin Barker, Feb 05 2017
(PARI) a(n) = sum(k=0, n\3, binomial(n-k, 2*k) * 2^k*3^(n-3*k)); \\ Michel Marcus, Feb 05 2017
(Magma) I:=[1, 3, 9]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 04 2019
(Sage)
def A099780_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1-3*x)/((1-3*x)^2 -2*x^3)).list()
A099780_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]+2*a[n-3]; od; a; # G. C. Greubel, Sep 04 2019
CROSSREFS
Sequence in context: A238979 A151030 A066331 * A006134 A074526 A231291
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 May 14 14:46 EDT 2024. Contains 372533 sequences. (Running on oeis4.)