A292548 Number of multisets of nonempty binary words with a total of n letters such that no word has a majority of 0's.
1, 1, 4, 8, 25, 53, 148, 328, 858, 1938, 4862, 11066, 27042, 61662, 147774, 336854, 795678, 1810466, 4228330, 9597694, 22211897, 50279985, 115489274, 260686018, 594986149, 1339215285, 3040004744, 6823594396, 15416270130, 34510814918, 77644149076, 173368564396
Offset: 0
Keywords
Examples
a(0) = 1: {}. a(1) = 1: {1}. a(2) = 4: {01}, {10}, {11}, {1,1}. a(3) = 8: {011}, {101}, {110}, {111}, {1,01}, {1,10}, {1,11}, {1,1,1}.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..3213
Programs
-
Maple
g:= n-> 2^(n-1)+`if`(n::odd, 0, binomial(n, n/2)/2): a:= proc(n) option remember; `if`(n=0, 1, add(add(d* g(d), d=numtheory[divisors](j))*a(n-j), j=1..n)/n) end: seq(a(n), n=0..35);
-
Mathematica
g[n_] := 2^(n-1) + If[OddQ[n], 0, Binomial[n, n/2]/2]; a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d* g[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Apr 30 2022, after Alois P. Heinz *)