cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A295704 Number of equivalence classes of 132-avoiding permutations of [n], where two permutations are equivalent if they have the same set of pure descents.

Original entry on oeis.org

1, 1, 2, 4, 10, 26, 66, 169, 437, 1130, 2926, 7597, 19749, 51381, 133812, 348755, 909464, 2372862, 6193720
Offset: 0

Views

Author

Eric M. Schmidt, Nov 25 2017

Keywords

Comments

As defined in Baril et al., a pure descent of a permutation p is a pair of the form (p_i, p_(i+1)) such that p_i > p_(i+1) and there is no j < i such that p_i > p_j > p_(i+1).

Crossrefs

Cf. A005773 (analogous sequence for 123-avoiding permutations), A152225 (conjecturally analogous sequence for 213-avoiding permutations).

Programs

  • Sage
    def DD(p) :
        pure_descents = []
        occur = 0
        for i in range(len(p)-1) :
            hi = p[i]; lo = p[i+1]
            mask = ((1 << (hi - lo)) - 1) << lo
            if hi > lo and not (occur & mask) :
                pure_descents.append((hi, lo))
            occur |= 1 << hi
        pure_descents.sort()
        return pure_descents
    def a(n): return len({tuple(DD(p)) for p in Permutations(n, avoiding=[1,3,2])})