login
Number of binary words of length n that contain all 32 5-bit words as (possibly overlapping) contiguous subwords.
4

%I #24 Sep 06 2022 06:08:34

%S 65536,352256,1442816,5313536,18323520,60481632,192562808,593792608,

%T 1782459992,5221699004,14967607810,42060446246,116067269324

%N Number of binary words of length n that contain all 32 5-bit words as (possibly overlapping) contiguous subwords.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CoinTossing.html">Coin Tossing</a>

%e a(36) = 65536: 000001000110010100111010110111110000, ... .

%p b:= proc(n, t, s) option remember; `if`(s={}, 2^n,

%p `if`(nops(s)>n, 0, b(n-1, irem(2*t, 16), s minus {2*t})

%p +b(n-1, irem(2*t+1, 16), s minus {2*t+1})))

%p end:

%p a:= n-> add(b(n-4, j, {$0..31}), j=0..15):

%p seq(a(n), n=36..37);

%t b[n_, t_, s_] := b[n, t, s] = If[s == {}, 2^n,

%t If[Length[s] > n, 0, b[n-1, Mod[2*t, 16], s~Complement~{2*t}] +

%t b[n-1, Mod[2*t+1, 16], s~Complement~{2*t+1}]]];

%t a[n_] := Sum[b[n-4, j, Range[0, 31]], {j, 0, 15}];

%t Table[a[n], {n, 36, 39}] (* _Jean-François Alcover_, Sep 06 2022, after _Alois P. Heinz_ *)

%Y Cf. A001146, A052944, A242167, A242206, A242257.

%K nonn,more

%O 36,1

%A _Alois P. Heinz_, May 10 2014

%E a(44)-a(48) from _Alois P. Heinz_, Feb 27 2015