OFFSET
0,9
COMMENTS
A(n,k) is the number of possible outcome sequences of length n of fair coin flips that do not contain k consecutive heads.
REFERENCES
Miklos Bona, Introduction to Enumerative and Analytic Combinatorics, CRC Press, 2025, pp. 391-392.
EXAMPLE
The array begins as:
0, 1, 1, 1, 1, 1, 1, ...
0, 1, 2, 2, 2, 2, 2, ...
0, 1, 3, 4, 4, 4, 4, ...
0, 1, 5, 7, 8, 8, 8, ...
0, 1, 8, 13, 15, 16, 16, ...
0, 1, 13, 24, 29, 31, 32, ...
0, 1, 21, 44, 56, 61, 63, ...
0, 1, 34, 81, 108, 120, 125, ...
...
MATHEMATICA
A[n_, k_]:=SeriesCoefficient[(1-x^k)/(1-2x+x^(1+k)), {x, 0, n}]; Table[A[n-k, k], {n, 0, 12}, {k, 0, n}]//Flatten
CROSSREFS
KEYWORD
AUTHOR
Stefano Spezia, Apr 05 2026
STATUS
approved
