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!)
A134396 A007318 * A000125. 3
1, 3, 9, 27, 80, 232, 656, 1808, 4864, 12800, 33024, 83712, 208896, 514048, 1249280, 3002368, 7143424, 16842752, 39387136, 91422720, 210763776, 482869248, 1099956224, 2492465152, 5620367360, 12616466432, 28202500096, 62797119488, 139318001664, 308029685760 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n) is the number of ternary strings of length n that contain at most three 0's.- Enrique Navarrete, Mar 13 2024
LINKS
FORMULA
Binomial transform of A000125. Row sums of triangle A134395.
O.g.f.: (1-x)*(1-4*x+5*x^2) / (1-2*x)^4. - R. J. Mathar, Jun 08 2008
From Colin Barker, Feb 13 2017: (Start)
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) for n>3.
a(n) = (2^(n-4)*(48 + 20*n + 3*n^2 + n^3)) / 3. (End)
E.g.f.: e^(2*x)*(1+x+x^2/2+x^3/6). - Enrique Navarrete, Mar 13 2024
EXAMPLE
a(3) = 27 = (1, 3, 3, 1) dot (1, 2, 4, 8) = (1 + 6 + 12 + 8), where A000125 = (1, 2, 4, 8, 15, 26, 42, ...).
a(3) = 27 = sum of row 3 terms of triangle A134395: (8 + 12 + 6 + 1).
MATHEMATICA
CoefficientList[Series[(1-x)(1-4x+5x^2)/(1-2x)^4, {x, 0, 30}], x] (* or *) LinearRecurrence[ {8, -24, 32, -16}, {1, 3, 9, 27}, 30] (* Harvey P. Dale, Mar 09 2023 *)
PROG
(PARI) Vec((1-x)*(1-4*x+5*x^2) / (1-2*x)^4 + O(x^30)) \\ Colin Barker, Feb 13 2017
CROSSREFS
Sequence in context: A304067 A287898 A129770 * A059502 A291006 A289781
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Oct 23 2007
EXTENSIONS
More terms from R. J. Mathar, Jun 08 2008
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 24 15:42 EDT 2024. Contains 371960 sequences. (Running on oeis4.)