Identifier
Identifier
Values
[1,0] generating graphics... => 0
[1,0,1,0] generating graphics... => 0
[1,1,0,0] generating graphics... => 1
[1,0,1,0,1,0] generating graphics... => 0
[1,0,1,1,0,0] generating graphics... => 1
[1,1,0,0,1,0] generating graphics... => 2
[1,1,0,1,0,0] generating graphics... => 1
[1,1,1,0,0,0] generating graphics... => 1
[1,0,1,0,1,0,1,0] generating graphics... => 0
[1,0,1,0,1,1,0,0] generating graphics... => 1
[1,0,1,1,0,0,1,0] generating graphics... => 2
[1,0,1,1,0,1,0,0] generating graphics... => 1
[1,0,1,1,1,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0] generating graphics... => 2
[1,1,0,0,1,1,0,0] generating graphics... => 2
[1,1,0,1,0,0,1,0] generating graphics... => 2
[1,1,0,1,0,1,0,0] generating graphics... => 1
[1,1,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,0,0,0,1,0] generating graphics... => 2
[1,1,1,0,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,0] generating graphics... => 1
[1,1,1,1,0,0,0,0] generating graphics... => 1
[1,0,1,0,1,0,1,0,1,0] generating graphics... => 0
[1,0,1,0,1,0,1,1,0,0] generating graphics... => 1
[1,0,1,0,1,1,0,0,1,0] generating graphics... => 2
[1,0,1,0,1,1,0,1,0,0] generating graphics... => 1
[1,0,1,0,1,1,1,0,0,0] generating graphics... => 1
[1,0,1,1,0,0,1,0,1,0] generating graphics... => 2
[1,0,1,1,0,0,1,1,0,0] generating graphics... => 2
[1,0,1,1,0,1,0,0,1,0] generating graphics... => 2
[1,0,1,1,0,1,0,1,0,0] generating graphics... => 1
[1,0,1,1,0,1,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,0,1,0] generating graphics... => 2
[1,0,1,1,1,0,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,1,0,0,0] generating graphics... => 1
[1,0,1,1,1,1,0,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0,1,0] generating graphics... => 2
[1,1,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,0,0,1,1,0,1,0,0] generating graphics... => 2
[1,1,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,0,0,1,0,1,0] generating graphics... => 2
[1,1,0,1,0,0,1,1,0,0] generating graphics... => 2
[1,1,0,1,0,1,0,0,1,0] generating graphics... => 2
[1,1,0,1,0,1,0,1,0,0] generating graphics... => 1
[1,1,0,1,0,1,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,0,0,1,0,1,0] generating graphics... => 2
[1,1,1,0,0,0,1,1,0,0] generating graphics... => 2
[1,1,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,0,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,0,1,0] generating graphics... => 2
[1,1,1,0,1,0,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,1,0,0,0] generating graphics... => 1
[1,1,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,0,1,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,0,0,0,0,0] generating graphics... => 1
[1,0,1,0,1,0,1,0,1,0,1,0] generating graphics... => 0
[1,0,1,0,1,0,1,0,1,1,0,0] generating graphics... => 1
[1,0,1,0,1,0,1,1,0,0,1,0] generating graphics... => 2
[1,0,1,0,1,0,1,1,0,1,0,0] generating graphics... => 1
[1,0,1,0,1,0,1,1,1,0,0,0] generating graphics... => 1
[1,0,1,0,1,1,0,0,1,0,1,0] generating graphics... => 2
[1,0,1,0,1,1,0,0,1,1,0,0] generating graphics... => 2
[1,0,1,0,1,1,0,1,0,0,1,0] generating graphics... => 2
[1,0,1,0,1,1,0,1,0,1,0,0] generating graphics... => 1
[1,0,1,0,1,1,0,1,1,0,0,0] generating graphics... => 2
[1,0,1,0,1,1,1,0,0,0,1,0] generating graphics... => 2
[1,0,1,0,1,1,1,0,0,1,0,0] generating graphics... => 2
[1,0,1,0,1,1,1,0,1,0,0,0] generating graphics... => 1
[1,0,1,0,1,1,1,1,0,0,0,0] generating graphics... => 1
[1,0,1,1,0,0,1,0,1,0,1,0] generating graphics... => 2
[1,0,1,1,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,0,1,1,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,0,1,1,0,0,1,1,0,1,0,0] generating graphics... => 2
[1,0,1,1,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,0,1,1,0,1,0,0,1,0,1,0] generating graphics... => 2
[1,0,1,1,0,1,0,0,1,1,0,0] generating graphics... => 2
[1,0,1,1,0,1,0,1,0,0,1,0] generating graphics... => 2
[1,0,1,1,0,1,0,1,0,1,0,0] generating graphics... => 1
[1,0,1,1,0,1,0,1,1,0,0,0] generating graphics... => 2
[1,0,1,1,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,0,1,1,0,1,1,0,1,0,0,0] generating graphics... => 2
[1,0,1,1,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,0,1,0,1,0] generating graphics... => 2
[1,0,1,1,1,0,0,0,1,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,0,1,1,1,0,0,1,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,0,1,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,0,1,0,0,0,1,0] generating graphics... => 2
[1,0,1,1,1,0,1,0,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,0,1,0,1,0,0,0] generating graphics... => 1
[1,0,1,1,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,0,0,1,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,0,1,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,0,1,0,0,0] generating graphics... => 2
[1,0,1,1,1,1,0,1,0,0,0,0] generating graphics... => 1
[1,0,1,1,1,1,1,0,0,0,0,0] generating graphics... => 1
[1,1,0,0,1,0,1,0,1,0,1,0] generating graphics... => 2
[1,1,0,0,1,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,0,0,1,0] generating graphics... => 4
[1,1,0,0,1,0,1,1,0,1,0,0] generating graphics... => 3
[1,1,0,0,1,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,0,0,1,1,0,0,1,0,1,0] generating graphics... => 3
[1,1,0,0,1,1,0,0,1,1,0,0] generating graphics... => 3
[1,1,0,0,1,1,0,1,0,0,1,0] generating graphics... => 3
[1,1,0,0,1,1,0,1,0,1,0,0] generating graphics... => 2
[1,1,0,0,1,1,0,1,1,0,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,0,0,0,1,0] generating graphics... => 4
[1,1,0,0,1,1,1,0,0,1,0,0] generating graphics... => 4
[1,1,0,0,1,1,1,0,1,0,0,0] generating graphics... => 3
[1,1,0,0,1,1,1,1,0,0,0,0] generating graphics... => 3
[1,1,0,1,0,0,1,0,1,0,1,0] generating graphics... => 2
[1,1,0,1,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,0,1,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,0,1,0,0,1,1,0,1,0,0] generating graphics... => 2
[1,1,0,1,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,0,1,0,0,1,0,1,0] generating graphics... => 2
[1,1,0,1,0,1,0,0,1,1,0,0] generating graphics... => 2
[1,1,0,1,0,1,0,1,0,0,1,0] generating graphics... => 2
[1,1,0,1,0,1,0,1,0,1,0,0] generating graphics... => 1
[1,1,0,1,0,1,0,1,1,0,0,0] generating graphics... => 2
[1,1,0,1,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,0,1,1,0,1,0,0,0] generating graphics... => 2
[1,1,0,1,0,1,1,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,1,0,0,0,1,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,0,0,1,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,0,0,1,0] generating graphics... => 4
[1,1,0,1,1,0,0,1,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,0,1,1,0,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,0,1,0,1,0,0,0] generating graphics... => 2
[1,1,0,1,1,0,1,1,0,0,0,0] generating graphics... => 3
[1,1,0,1,1,1,0,0,0,0,1,0] generating graphics... => 3
[1,1,0,1,1,1,0,0,0,1,0,0] generating graphics... => 3
[1,1,0,1,1,1,0,0,1,0,0,0] generating graphics... => 3
[1,1,0,1,1,1,0,1,0,0,0,0] generating graphics... => 2
[1,1,0,1,1,1,1,0,0,0,0,0] generating graphics... => 2
[1,1,1,0,0,0,1,0,1,0,1,0] generating graphics... => 2
[1,1,1,0,0,0,1,0,1,1,0,0] generating graphics... => 3
[1,1,1,0,0,0,1,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,0,1,1,0,1,0,0] generating graphics... => 2
[1,1,1,0,0,0,1,1,1,0,0,0] generating graphics... => 3
[1,1,1,0,0,1,0,0,1,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,0,0,1,1,0,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,0,0,1,0,1,1,0,0,0] generating graphics... => 3
[1,1,1,0,0,1,1,0,0,0,1,0] generating graphics... => 3
[1,1,1,0,0,1,1,0,0,1,0,0] generating graphics... => 3
[1,1,1,0,0,1,1,0,1,0,0,0] generating graphics... => 2
[1,1,1,0,0,1,1,1,0,0,0,0] generating graphics... => 3
[1,1,1,0,1,0,0,0,1,0,1,0] generating graphics... => 2
[1,1,1,0,1,0,0,0,1,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,0,1,0,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,0,1,0,1,0,0,0,1,0] generating graphics... => 2
[1,1,1,0,1,0,1,0,0,1,0,0] generating graphics... => 2
[1,1,1,0,1,0,1,0,1,0,0,0] generating graphics... => 1
[1,1,1,0,1,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,0,0,0,0,1,0] generating graphics... => 3
[1,1,1,0,1,1,0,0,0,1,0,0] generating graphics... => 3
[1,1,1,0,1,1,0,0,1,0,0,0] generating graphics... => 3
[1,1,1,0,1,1,0,1,0,0,0,0] generating graphics... => 2
[1,1,1,0,1,1,1,0,0,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,0,1,0,1,0] generating graphics... => 2
[1,1,1,1,0,0,0,0,1,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,0,0,1,0] generating graphics... => 3
[1,1,1,1,0,0,0,1,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,0,0,1,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,0,0,0,1,0] generating graphics... => 3
[1,1,1,1,0,0,1,0,0,1,0,0] generating graphics... => 3
[1,1,1,1,0,0,1,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,0,1,1,0,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,0,0,1,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,0,1,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,0,1,0,1,0,0,0,0] generating graphics... => 1
[1,1,1,1,0,1,1,0,0,0,0,0] generating graphics... => 2
[1,1,1,1,1,0,0,0,0,0,1,0] generating graphics... => 2
[1,1,1,1,1,0,0,0,0,1,0,0] generating graphics... => 2
[1,1,1,1,1,0,0,0,1,0,0,0] generating graphics... => 2
[1,1,1,1,1,0,0,1,0,0,0,0] generating graphics... => 2
[1,1,1,1,1,0,1,0,0,0,0,0] generating graphics... => 1
[1,1,1,1,1,1,0,0,0,0,0,0] generating graphics... => 1
click to show generating function       
Description
The number of non-final maximal sub-paths of length greater than one.
References
[1] Sulanke, R. A. Catalan path statistics having the Narayana distribution MathSciNet:1603692 DOI:10.1016/s0012-365x(97)00126-x
Code
def statistic(x):
    paths = 0
    i = 0
    while i < len(x):
        if x[i] == 1:
            if x[i+1] == 1:
                while x[i] == 1:
                    i = i + 1
                paths = paths + 1
        if x[i] == 0:
            if i < len(x)-1 and x[i+1] == 0:
                while i < len(x) and x[i] == 0:
                    i = i + 1
                paths = paths + 1
        i = i + 1
    if x[len(x) - 2] == 0:
        paths = paths - 1
    return paths
Created
Dec 18, 2015 at 17:59 by Veronica Waite
Updated
Dec 19, 2015 at 15:43 by Martin Rubey