login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242536 Number of n-length words on {1,2,3,4} such that the maximal runs of identical odd integers are of odd length and the maximal runs of identical even integers are of even length. 2
1, 2, 4, 12, 26, 66, 160, 386, 946, 2292, 5582, 13578, 33016, 80330, 195370, 475236, 1155974, 2811762, 6839416, 16636178, 40466002, 98429844, 239421374, 582370554, 1416562360, 3445657082, 8381242522, 20386597380, 49588514390, 120619477410, 293395730296 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

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

FORMULA

G.f.: (1 + x - x^2)/(1 - x -3*x^2 - 2*x^3 + 2*x^4).

a(n) = a(n-1) +3*a(n-2) +2*a(n-3) -2*a(n-4). - Fung Lam, May 18 2014

EXAMPLE

a(3)=12 because we have: 111, 122, 131, 144, 221, 223, 313, 322, 333, 344, 441, 443.

MATHEMATICA

n=4; nn=30; CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i]), {i, 1, n}])/.Join[Table[v[i]->z/(1-z^2), {i, 1, n, 2}], Table[v[i]->z^2/(1-z^2), {i, 2, n, 2}]], {z, 0, nn}], z]

CROSSREFS

Cf. A062200, A242510, A242537.

Sequence in context: A236002 A291406 A219752 * A027132 A148172 A148173

Adjacent sequences:  A242533 A242534 A242535 * A242537 A242538 A242539

KEYWORD

nonn,easy

AUTHOR

Geoffrey Critzer, May 17 2014

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 14 06:14 EST 2018. Contains 317162 sequences. (Running on oeis4.)