edit this statistic or download as text // json
Identifier
Values
=>
0=>1 1=>1 00=>1 01=>3 10=>3 11=>1 000=>1 001=>4 010=>5 011=>4 100=>4 101=>5 110=>4 111=>1 0000=>1 0001=>5 0010=>7 0011=>6 0100=>7 0101=>6 0110=>7 0111=>5 1000=>5 1001=>7 1010=>6 1011=>7 1100=>6 1101=>7 1110=>5 1111=>1 00000=>1 00001=>6 00010=>9 00011=>8 00100=>10 00101=>9 00110=>10 00111=>8 01000=>9 01001=>10 01010=>7 01011=>9 01100=>10 01101=>10 01110=>9 01111=>6 10000=>6 10001=>9 10010=>10 10011=>10 10100=>9 10101=>7 10110=>10 10111=>9 11000=>8 11001=>10 11010=>9 11011=>10 11100=>8 11101=>9 11110=>6 11111=>1 000000=>1 000001=>7 000010=>11 000011=>10 000100=>13 000101=>12 000110=>13 000111=>11 001000=>13 001001=>12 001010=>11 001011=>13 001100=>14 001101=>14 001110=>13 001111=>10 010000=>11 010001=>13 010010=>12 010011=>14 010100=>11 010101=>8 010110=>13 010111=>12 011000=>13 011001=>14 011010=>13 011011=>12 011100=>13 011101=>13 011110=>11 011111=>7 100000=>7 100001=>11 100010=>13 100011=>13 100100=>12 100101=>13 100110=>14 100111=>13 101000=>12 101001=>13 101010=>8 101011=>11 101100=>14 101101=>12 101110=>13 101111=>11 110000=>10 110001=>13 110010=>14 110011=>14 110100=>13 110101=>11 110110=>12 110111=>13 111000=>11 111001=>13 111010=>12 111011=>13 111100=>10 111101=>11 111110=>7 111111=>1 0000000=>1 0000001=>8 0000010=>13 0000011=>12 0000100=>16 0000101=>15 0000110=>16 0000111=>14 0001000=>17 0001001=>16 0001010=>15 0001011=>17 0001100=>18 0001101=>18 0001110=>17 0001111=>14 0010000=>16 0010001=>17 0010010=>14 0010011=>17 0010100=>16 0010101=>13 0010110=>18 0010111=>17 0011000=>18 0011001=>18 0011010=>18 0011011=>17 0011100=>18 0011101=>18 0011110=>16 0011111=>12 0100000=>13 0100001=>16 0100010=>17 0100011=>18 0100100=>14 0100101=>16 0100110=>19 0100111=>18 0101000=>15 0101001=>16 0101010=>9 0101011=>13 0101100=>18 0101101=>16 0101110=>17 0101111=>15 0110000=>16 0110001=>18 0110010=>19 0110011=>18 0110100=>18 0110101=>16 0110110=>14 0110111=>16 0111000=>17 0111001=>18 0111010=>17 0111011=>17 0111100=>16 0111101=>16 0111110=>13 0111111=>8 1000000=>8 1000001=>13 1000010=>16 1000011=>16 1000100=>17 1000101=>17 1000110=>18 1000111=>17 1001000=>16 1001001=>14 1001010=>16 1001011=>18 1001100=>18 1001101=>19 1001110=>18 1001111=>16 1010000=>15 1010001=>17 1010010=>16 1010011=>18 1010100=>13 1010101=>9 1010110=>16 1010111=>15 1011000=>18 1011001=>19 1011010=>16 1011011=>14 1011100=>18 1011101=>17 1011110=>16 1011111=>13 1100000=>12 1100001=>16 1100010=>18 1100011=>18 1100100=>17 1100101=>18 1100110=>18 1100111=>18 1101000=>17 1101001=>18 1101010=>13 1101011=>16 1101100=>17 1101101=>14 1101110=>17 1101111=>16 1110000=>14 1110001=>17 1110010=>18 1110011=>18 1110100=>17 1110101=>15 1110110=>16 1110111=>17 1111000=>14 1111001=>16 1111010=>15 1111011=>16 1111100=>12 1111101=>13 1111110=>8 1111111=>1 00000000=>1 00000001=>9 00000010=>15 00000011=>14 00000100=>19 00000101=>18 00000110=>19 00000111=>17 00001000=>21 00001001=>20 00001010=>19 00001011=>21 00001100=>22 00001101=>22 00001110=>21 00001111=>18 00010000=>21 00010001=>20 00010010=>19 00010011=>22 00010100=>21 00010101=>18 00010110=>23 00010111=>22 00011000=>23 00011001=>23 00011010=>23 00011011=>22 00011100=>23 00011101=>23 00011110=>21 00011111=>17 00100000=>19 00100001=>21 00100010=>20 00100011=>23 00100100=>16 00100101=>19 00100110=>23 00100111=>22 00101000=>21 00101001=>21 00101010=>15 00101011=>19 00101100=>24 00101101=>22 00101110=>23 00101111=>21 00110000=>22 00110001=>23 00110010=>24 00110011=>21 00110100=>24 00110101=>22 00110110=>20 00110111=>22 00111000=>23 00111001=>23 00111010=>23 00111011=>23 00111100=>22 00111101=>22 00111110=>19 00111111=>14 01000000=>15 01000001=>19 01000010=>21 01000011=>22 01000100=>20 01000101=>22 01000110=>24 01000111=>23 01001000=>19 01001001=>16 01001010=>20 01001011=>22 01001100=>24 01001101=>25 01001110=>24 01001111=>22 01010000=>19 01010001=>21 01010010=>20 01010011=>22 01010100=>15 01010101=>10 01010110=>19 01010111=>18 01011000=>23 01011001=>24 01011010=>20 01011011=>19 01011100=>23 01011101=>22 01011110=>21 01011111=>18 01100000=>19 01100001=>22 01100010=>24 01100011=>23 01100100=>23 01100101=>24 01100110=>21 01100111=>23 01101000=>23 01101001=>24 01101010=>19 01101011=>21 01101100=>20 01101101=>16 01101110=>21 01101111=>20 01110000=>21 01110001=>23 01110010=>24 01110011=>23 01110100=>23 01110101=>21 01110110=>21 01110111=>20 01111000=>21 01111001=>22 01111010=>21 01111011=>21 01111100=>19 01111101=>19 01111110=>15 01111111=>9 10000000=>9 10000001=>15 10000010=>19 10000011=>19 10000100=>21 10000101=>21 10000110=>22 10000111=>21 10001000=>20 10001001=>21 10001010=>21 10001011=>23 10001100=>23 10001101=>24 10001110=>23 10001111=>21 10010000=>20 10010001=>21 10010010=>16 10010011=>20 10010100=>21 10010101=>19 10010110=>24 10010111=>23 10011000=>23 10011001=>21 10011010=>24 10011011=>23 10011100=>23 10011101=>24 10011110=>22 10011111=>19 10100000=>18 10100001=>21 10100010=>22 10100011=>23 10100100=>19 10100101=>20 10100110=>24 10100111=>23 10101000=>18 10101001=>19 10101010=>10 10101011=>15 10101100=>22 10101101=>20 10101110=>21 10101111=>19 10110000=>22 10110001=>24 10110010=>25 10110011=>24 10110100=>22 10110101=>20 10110110=>16 10110111=>19 10111000=>23 10111001=>24 10111010=>22 10111011=>20 10111100=>22 10111101=>21 10111110=>19 10111111=>15 11000000=>14 11000001=>19 11000010=>22 11000011=>22 11000100=>23 11000101=>23 11000110=>23 11000111=>23 11001000=>22 11001001=>20 11001010=>22 11001011=>24 11001100=>21 11001101=>24 11001110=>23 11001111=>22 11010000=>21 11010001=>23 11010010=>22 11010011=>24 11010100=>19 11010101=>15 11010110=>21 11010111=>21 11011000=>22 11011001=>23 11011010=>19 11011011=>16 11011100=>23 11011101=>20 11011110=>21 11011111=>19 11100000=>17 11100001=>21 11100010=>23 11100011=>23 11100100=>22 11100101=>23 11100110=>23 11100111=>23 11101000=>22 11101001=>23 11101010=>18 11101011=>21 11101100=>22 11101101=>19 11101110=>20 11101111=>21 11110000=>18 11110001=>21 11110010=>22 11110011=>22 11110100=>21 11110101=>19 11110110=>20 11110111=>21 11111000=>17 11111001=>19 11111010=>18 11111011=>19 11111100=>14 11111101=>15 11111110=>9 11111111=>1 000000000=>1 000000001=>10 000000010=>17 000000011=>16 000000100=>22 000000101=>21 000000110=>22 000000111=>20 000001000=>25 000001001=>24 000001010=>23 000001011=>25 000001100=>26 000001101=>26 000001110=>25 000001111=>22 000010000=>26 000010001=>25 000010010=>24 000010011=>27 000010100=>26 000010101=>23 000010110=>28 000010111=>27 000011000=>28 000011001=>28 000011010=>28 000011011=>27 000011100=>28 000011101=>28 000011110=>26 000011111=>22 000100000=>25 000100001=>26 000100010=>23 000100011=>27 000100100=>22 000100101=>25 000100110=>29 000100111=>28 000101000=>27 000101001=>27 000101010=>21 000101011=>25 000101100=>30 000101101=>28 000101110=>29 000101111=>27 000110000=>28 000110001=>28 000110010=>30 000110011=>27 000110100=>30 000110101=>28 000110110=>26 000110111=>28 000111000=>29 000111001=>29 000111010=>29 000111011=>29 000111100=>28 000111101=>28 000111110=>25 000111111=>20 001000000=>22 001000001=>25 001000010=>26 001000011=>28 001000100=>23 001000101=>26 001000110=>30 001000111=>29 001001000=>22 001001001=>18 001001010=>24 001001011=>26 001001100=>29 001001101=>30 001001110=>29 001001111=>27 001010000=>26 001010001=>27 001010010=>25 001010011=>28 001010100=>22 001010101=>17 001010110=>26 001010111=>25 001011000=>30 001011001=>30 001011010=>27 001011011=>26 001011100=>30 001011101=>29 001011110=>28 001011111=>25 001100000=>26 001100001=>28 001100010=>30 001100011=>28 001100100=>29 001100101=>30 001100110=>24 001100111=>27 001101000=>30 001101001=>30 001101010=>26 001101011=>28 001101100=>27 001101101=>23 001101110=>28 001101111=>27 001110000=>28 001110001=>29 001110010=>30 001110011=>28 001110100=>30 001110101=>28 001110110=>28 001110111=>27 001111000=>28 001111001=>28 001111010=>28 001111011=>28 001111100=>26 001111101=>26 001111110=>22 001111111=>16 010000000=>17 010000001=>22 010000010=>25 010000011=>26 010000100=>26 010000101=>27 010000110=>29 010000111=>28 010001000=>23 010001001=>25 010001010=>27 010001011=>29 010001100=>30 010001101=>31 010001110=>30 010001111=>28 010010000=>24 010010001=>25 010010010=>18 010010011=>23 010010100=>25 010010101=>24 010010110=>29 010010111=>28 010011000=>30 010011001=>28 010011010=>30 010011011=>30 010011100=>30 010011101=>31 010011110=>29 010011111=>26 010100000=>23 010100001=>26 010100010=>27 010100011=>28 010100100=>24 010100101=>25 010100110=>29 010100111=>28 010101000=>21 010101001=>22 010101010=>11 010101011=>17 010101100=>26 010101101=>24 010101110=>25 010101111=>23 010110000=>28 010110001=>30 010110010=>30 010110011=>30 010110100=>27 010110101=>25 010110110=>22 010110111=>25 010111000=>29 010111001=>30 010111010=>27 010111011=>26 010111100=>28 010111101=>27 010111110=>25 010111111=>21 011000000=>22 011000001=>26 011000010=>29 011000011=>28 011000100=>30 011000101=>30 011000110=>28 011000111=>29 011001000=>29 011001001=>27 011001010=>29 011001011=>30 011001100=>24 011001101=>28 011001110=>29 011001111=>28 011010000=>28 011010001=>30 011010010=>29 011010011=>30 011010100=>26 011010101=>22 011010110=>26 011010111=>27 011011000=>26 011011001=>27 011011010=>22 011011011=>18 011011100=>28 011011101=>25 011011110=>26 011011111=>24 011100000=>25 011100001=>28 011100010=>30 011100011=>29 011100100=>29 011100101=>30 011100110=>29 011100111=>28 011101000=>29 011101001=>30 011101010=>25 011101011=>27 011101100=>28 011101101=>25 011101110=>23 011101111=>25 011110000=>26 011110001=>28 011110010=>29 011110011=>28 011110100=>28 011110101=>26 011110110=>26 011110111=>26 011111000=>25 011111001=>26 011111010=>25 011111011=>25 011111100=>22 011111101=>22 011111110=>17 011111111=>10 100000000=>10 100000001=>17 100000010=>22 100000011=>22 100000100=>25 100000101=>25 100000110=>26 100000111=>25 100001000=>26 100001001=>26 100001010=>26 100001011=>28 100001100=>28 100001101=>29 100001110=>28 100001111=>26 100010000=>25 100010001=>23 100010010=>25 100010011=>28 100010100=>27 100010101=>25 100010110=>30 100010111=>29 100011000=>28 100011001=>29 100011010=>30 100011011=>29 100011100=>29 100011101=>30 100011110=>28 100011111=>25 100100000=>24 100100001=>26 100100010=>25 100100011=>28 100100100=>18 100100101=>22 100100110=>27 100100111=>26 100101000=>27 100101001=>26 100101010=>22 100101011=>26 100101100=>30 100101101=>29 100101110=>30 100101111=>28 100110000=>28 100110001=>29 100110010=>28 100110011=>24 100110100=>30 100110101=>29 100110110=>27 100110111=>29 100111000=>29 100111001=>28 100111010=>30 100111011=>30 100111100=>28 100111101=>29 100111110=>26 100111111=>22 101000000=>21 101000001=>25 101000010=>27 101000011=>28 101000100=>26 101000101=>27 101000110=>30 101000111=>29 101001000=>25 101001001=>22 101001010=>25 101001011=>27 101001100=>30 101001101=>30 101001110=>30 101001111=>28 101010000=>23 101010001=>25 101010010=>24 101010011=>26 101010100=>17 101010101=>11 101010110=>22 101010111=>21 101011000=>28 101011001=>29 101011010=>25 101011011=>24 101011100=>28 101011101=>27 101011110=>26 101011111=>23 101100000=>26 101100001=>29 101100010=>31 101100011=>30 101100100=>30 101100101=>30 101100110=>28 101100111=>30 101101000=>28 101101001=>29 101101010=>24 101101011=>25 101101100=>23 101101101=>18 101101110=>25 101101111=>24 101110000=>28 101110001=>30 101110010=>31 101110011=>30 101110100=>29 101110101=>27 101110110=>25 101110111=>23 101111000=>28 101111001=>29 101111010=>27 101111011=>26 101111100=>26 101111101=>25 101111110=>22 101111111=>17 110000000=>16 110000001=>22 110000010=>26 110000011=>26 110000100=>28 110000101=>28 110000110=>28 110000111=>28 110001000=>27 110001001=>28 110001010=>28 110001011=>30 110001100=>28 110001101=>30 110001110=>29 110001111=>28 110010000=>27 110010001=>28 110010010=>23 110010011=>27 110010100=>28 110010101=>26 110010110=>30 110010111=>30 110011000=>27 110011001=>24 110011010=>30 110011011=>29 110011100=>28 110011101=>30 110011110=>28 110011111=>26 110100000=>25 110100001=>28 110100010=>29 110100011=>30 110100100=>26 110100101=>27 110100110=>30 110100111=>30 110101000=>25 110101001=>26 110101010=>17 110101011=>22 110101100=>28 110101101=>25 110101110=>27 110101111=>26 110110000=>27 110110001=>29 110110010=>30 110110011=>29 110110100=>26 110110101=>24 110110110=>18 110110111=>22 110111000=>29 110111001=>30 110111010=>26 110111011=>23 110111100=>28 110111101=>26 110111110=>25 110111111=>22 111000000=>20 111000001=>25 111000010=>28 111000011=>28 111000100=>29 111000101=>29 111000110=>29 111000111=>29 111001000=>28 111001001=>26 111001010=>28 111001011=>30 111001100=>27 111001101=>30 111001110=>28 111001111=>28 111010000=>27 111010001=>29 111010010=>28 111010011=>30 111010100=>25 111010101=>21 111010110=>27 111010111=>27 111011000=>28 111011001=>29 111011010=>25 111011011=>22 111011100=>27 111011101=>23 111011110=>26 111011111=>25 111100000=>22 111100001=>26 111100010=>28 111100011=>28 111100100=>27 111100101=>28 111100110=>28 111100111=>28 111101000=>27 111101001=>28 111101010=>23 111101011=>26 111101100=>27 111101101=>24 111101110=>25 111101111=>26 111110000=>22 111110001=>25 111110010=>26 111110011=>26 111110100=>25 111110101=>23 111110110=>24 111110111=>25 111111000=>20 111111001=>22 111111010=>21 111111011=>22 111111100=>16 111111101=>17 111111110=>10 111111111=>1
search for individual values
searching the database for the individual values of this statistic
/ search for generating function
searching the database for statistics with the same generating function
click to show known generating functions       
Description
The number of nonempty primitive factors of a binary word.
A word $u$ is a factor of a word $w$ if $w = p u s$ for words $p$ and $s$. A word is primitive, if it is not of the form $u^k$ for a word $u$ and an integer $k\geq 2$.
Apparently, the maximal number of nonempty primitive factors a binary word of length $n$ can have is given by oeis:A131673.
Code
def statistic(w):
    return sum(1 for f in w.factor_iterator() if f and f.is_primitive())
Created
Sep 16, 2022 at 10:06 by Martin Rubey
Updated
Sep 16, 2022 at 10:06 by Martin Rubey