OFFSET
0,2
COMMENTS
Each of the subwords 100001, 100011, 100101, 100111, 101001, 101011, 101111, 110001, 110101, 111001, 111101 and their binary complements give the same sequence.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..3396 (terms 0..1000 from Alois P. Heinz)
Index entries for linear recurrences with constant coefficients, signature (2,0,0,0,-1,1).
FORMULA
G.f.: -(x^5+1)/(x^6-x^5+2*x-1).
a(n) = 2^n if n<6, and a(n) = 2*a(n-1) -a(n-5) +a(n-6) otherwise.
EXAMPLE
a(8) = 244 because among the 2^8 = 256 binary words of length 8 only 12, namely 00100001, 01000010, 01000011, 01100001, 10000100, 10000101, 10000110, 10000111, 10100001, 11000010, 11000011, 11100001 contain the subword 100001.
MAPLE
a:= n-> (Matrix(6, (i, j)-> `if`(i=j-1, 1, `if`(i=6, [1, -1, 0, 0, 0, 2][j], 0)))^n. <<1, 2, 4, 8, 16, 32>>)[1, 1]: seq(a(n), n=0..40);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Mar 16 2012
STATUS
approved