login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119915 Number of ternary words of length n and having exactly one run of 0's of odd length. 3
0, 1, 4, 13, 40, 117, 332, 921, 2512, 6761, 18004, 47525, 124536, 324317, 840092, 2166065, 5562272, 14232273, 36300196, 92321085, 234192584, 592695109, 1496810732, 3772761289, 9492450672, 23844342073, 59804611060, 149787196117 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Column 1 of A119914.

LINKS

Table of n, a(n) for n=0..27.

Index entries for linear recurrences with constant coefficients, signature (4,-2,-4,-1).

FORMULA

a(n) = [z^n] z*(1 - z^2)/(1 - 2*z - z^2)^2.

a(n) = A006645(n+1) - A006645(n-1). - R. J. Mathar, Aug 07 2015

From Peter Luschny, Jan 14 2020: (Start)

a(n) = Sum_{k=0..n} A193737(n, k)*k.

Let h(k) = (1 + k)*exp((1 + k)*x)*(1 + x - 1/k)/4 then

a(n) = n!*[x^n](h(sqrt(2)) + h(-sqrt(2))).  (End)

EXAMPLE

a(3) = 13 because we have 000, 011, 012, 021, 022, 101, 102, 110, 120, 201, 202, 210 and 220 (for example, 001, 020 do not qualify).

MAPLE

g := z*(1-z^2)/(1-2*z-z^2)^2:

gser := series(g, z=0, 34):

seq(coeff(gser, z, n), n=0..30);

MATHEMATICA

LinearRecurrence[ {4, -2, -4, -1}, {0, 1, 4, 13}, 28] (* Peter Luschny, Jan 14 2020 *)

CROSSREFS

Cf. A119914, A193737, A006645.

Sequence in context: A271012 A272581 A191132 * A307577 A137744 A027130

Adjacent sequences:  A119912 A119913 A119914 * A119916 A119917 A119918

KEYWORD

nonn,easy

AUTHOR

Emeric Deutsch, May 29 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 09:53 EDT 2020. Contains 335686 sequences. (Running on oeis4.)