• + 1 comment
    sum([(i+d in seq and i+d+d in seq) for i in seq])