login
A184364
a(n,k) = 2^n times the average number of different subwords of length k in a random binary word of length n (prob 0 = prob 1 = 1/2), n>=1, 1<=k<=n; triangle read by rows.
1
2, 6, 4, 14, 14, 8, 30, 38, 30, 16, 62, 90, 86, 62, 32, 126, 200, 218, 182, 126, 64, 254, 428, 516, 474, 374, 254, 128, 510, 896, 1170, 1156, 986, 758, 510, 256, 1022, 1850, 2576, 2698, 2436, 2010, 1526, 1022, 512, 2046, 3786, 5554, 6118, 5770, 4996, 4058, 3062, 2046, 1024
OFFSET
1,1
LINKS
EXAMPLE
For example, let n=3, k=2.
-------------------------------
word number of different subwords of length 2
-------------------------------
000 1
001 2
010 2
011 2
100 2
101 2
110 2
111 1
----------
total: 14 = a(3,2)
MATHEMATICA
nbSubWords[m_, k_] := Length[DeleteDuplicates[Partition[m, k, 1]]];
a[n_, k_] := Plus @@ (nbSubWords[#, k] & /@ Tuples[{0, 1}, n])
CROSSREFS
Sequence in context: A268716 A204985 A255066 * A226569 A111807 A069914
KEYWORD
nonn,tabl
AUTHOR
Donatien Bénéat, Dec 24 2012
STATUS
approved