|
|
A349529
|
|
Number of permutations of the base-2 representations of 1, 2, ..., n that are unambiguous when written without delimiters.
|
|
1
|
|
|
1, 2, 2, 12, 48, 164, 348, 6000, 56202, 529434, 4378410, 50607424, 465231342, 4414360152, 28075191592
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 3 the base-2 representations of 1, 2, 3 are the words 1, 10, 11. Of the 6 permutations of these words, the a(3) = 2 permutations 1,10,11 and 11,10,1 are unambiguous when the commas are removed, since 11011 and 11101 each arise from a unique permutation. On the other hand, the permutations 1,11,10 and 11,1,10 are ambiguous when the commas are removed because they become the same word; similarly, 10,1,11 and 10,11,1 become the same word.
|
|
MATHEMATICA
|
Table[Count[Counts[Join @@@ Permutations[(IntegerDigits[#, 2] &) /@ Range[1, n]]], 1], {n, 1, 8}]
|
|
PROG
|
(Python)
from collections import Counter
from itertools import permutations
def A349529(n): return len(list(filter(lambda x: x == 1, Counter(''.join(d) for d in permutations(bin(i)[2:] for i in range(1, n+1))).values()))) # Chai Wah Wu, Nov 22 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|