A118425 Number of binary sequences of length n containing exactly one subsequence 001.
0, 0, 0, 1, 4, 12, 30, 68, 144, 291, 568, 1080, 2012, 3688, 6672, 11941, 21180, 37284, 65210, 113420, 196320, 338375, 581040, 994416, 1696824, 2887632, 4902240, 8304073, 14038324, 23688636, 39905238, 67118420, 112726512, 189072363
Offset: 0
Keywords
Examples
a(4)=4 because we have 0010, 0011, 0001 and 1001.
Links
- Index entries for linear recurrences with constant coefficients, signature (4,-4,-2,4,0,-1).
Programs
-
Maple
g:=z^3/(1-2*z+z^3)^2: gser:=series(g,z=0,40): seq(coeff(gser,z,n),n=0..38);
Formula
G.f.=z^3/(1-2z+z^3)^2.
Comments