login
A260505
Number of binary words of length n with exactly one occurrence of subword 010 and exactly two occurrences of subword 101.
4
0, 0, 0, 0, 0, 1, 2, 7, 16, 38, 82, 175, 362, 736, 1468, 2885, 5596, 10736, 20398, 38423, 71818, 133307, 245890, 450970, 822788, 1493992, 2700800, 4862566, 8721608, 15588371, 27770338, 49320863, 87344004, 154263972, 271765362, 477622769, 837519742, 1465470968
OFFSET
0,7
LINKS
Index entries for linear recurrences with constant coefficients, signature (6,-13,10,6,-18,11,6,-10,2,3,-2,-1).
FORMULA
G.f.: -x^5*(2*x^2-x+1)*(x-1)^3/((x^2-x+1)^2*(x^2+x-1)^4).
EXAMPLE
a(5) = 1: 10101.
a(6) = 2: 101011, 110101.
a(7) = 7: 0101101, 0110101, 1010110, 1010111, 1011010, 1101011, 1110101.
a(8) = 16: 00101101, 00110101, 01011011, 01011101, 01101011, 01110101, 10101100, 10101110, 10101111, 10110100, 10111010, 11010110, 11010111, 11011010, 11101011, 11110101.
a(9) = 38: 000101101, 000110101, 001011011, ..., 111011010, 111101011, 111110101.
a(10) = 82: 0000101101, 0000110101, 0001011011, ..., 1111011010, 1111101011, 1111110101.
MAPLE
gf:= -x^5*(2*x^2-x+1)*(x-1)^3/((x^2-x+1)^2*(x^2+x-1)^4):
a:= n-> coeff(series(gf, x, n+1), x, n):
seq(a(n), n=0..40);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Nov 11 2015
STATUS
approved