def motif_factors(m, M):
    """
    Generates the set of non redundant motif sizes to be checked for division
    rule.

    Parameters
    ----------
    m : <int> minimum motif size

    M : <int> maximum motif size

    Returns
    -------
    factors : <list> sorted(descending) list of non-redundant motifs.
    """
    factors = []
    for i in range(M, m-1, -1):
        check = 0
        for j in factors:
            if j % i == 0: check = 1; break
        if check == 0: factors.append(i)
    
    return factors