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

Created
Feb 11, 2019 at 18:21 by Christian Stump
Updated
Feb 12, 2019 at 07:43 by Christian Stump