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!)
A255386 Number of binary words of length n with exactly one occurrence of subword 010 and exactly one occurrence of subword 101. 6
0, 0, 0, 0, 2, 4, 10, 20, 42, 84, 166, 320, 608, 1140, 2116, 3892, 7102, 12868, 23170, 41488, 73918, 131104, 231578, 407520, 714672, 1249368, 2177736, 3785688, 6564362, 11355940, 19602154, 33767228, 58056786, 99638364, 170711134, 292011872, 498747632 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

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

FORMULA

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

EXAMPLE

a(4) = 2: 0101, 1010.

a(5) = 4: 00101, 01011, 10100, 11010.

a(6) = 10: 000101, 001011, 010110, 010111, 011010, 100101, 101000, 101001, 110100, 111010.

a(8) = 42: 00000101, 00001011, 00010110, 00010111, 00011010, 00101100, 00101110, 00101111, 00110100, 00111010, 01001101, 01011000, 01011001, 01011100, 01011110, 01011111, 01100101, 01101000, 01101001, 01110100, 01111010, 10000101, 10001011, 10010110, 10010111, 10011010, 10100000, 10100001, 10100011, 10100110, 10100111, 10110010, 11000101, 11001011, 11010000, 11010001, 11010011, 11100101, 11101000, 11101001, 11110100, 11111010.

MAPLE

a:= n-> coeff(series(-2*x^4*(x-1)^2/

        ((x^2-x+1)*(x^2+x-1)^3), x, n+1), x, n):

seq(a(n), n=0..50);

MATHEMATICA

LinearRecurrence[{4, -4, -2, 5, -2, -2, 2, 1}, {0, 0, 0, 0, 2, 4, 10, 20}, 40] (* Harvey P. Dale, Apr 09 2016 *)

CROSSREFS

Cf. A118430, A260697.

Sequence in context: A283213 A283251 A318975 * A167030 A026644 A167193

Adjacent sequences:  A255383 A255384 A255385 * A255387 A255388 A255389

KEYWORD

nonn

AUTHOR

Alois P. Heinz, May 05 2015

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 06:56 EDT 2020. Contains 335676 sequences. (Running on oeis4.)