OFFSET
0,2
FORMULA
a(n>0) = 2 * A032020(n).
EXAMPLE
The a(0) = 1 through a(6) = 22 words:
{} 0 00 000 0000 00000 000000
1 11 001 0001 00001 000001
011 0111 00011 000011
100 1000 00111 000100
110 1110 01111 000110
111 1111 10000 001000
11000 001110
11100 001111
11110 011000
11111 011100
011111
100000
100011
100111
110000
110001
110111
111001
111011
111100
111110
111111
MATHEMATICA
Table[Length[Select[Tuples[{0, 1}, n], UnsameQ@@Length/@Split[#]&]], {n, 0, 10}]
PROG
(Python)
from itertools import groupby, product
def adrl(s):
runlens = [len(list(g)) for k, g in groupby(s)]
return len(runlens) == len(set(runlens))
def a(n):
if n == 0: return 1
return 2*sum(adrl("1"+"".join(w)) for w in product("01", repeat=n-1))
print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 08 2022
CROSSREFS
The version for partitions is A098859.
The complement is counted by twice A261982.
A000120 counts binary weight.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329767 counts binary words by runs-resistance.
A351014 counts distinct runs in standard compositions.
A351204 counts partitions where every permutation has all distinct runs.
A351290 ranks compositions with all distinct runs.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 07 2022
EXTENSIONS
a(25)-a(32) from Michael S. Branicky, Feb 08 2022
More terms from David A. Corneth, Feb 08 2022 using data from A032020
STATUS
approved