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.

A258683 Total number of permutations on {1,2,...,n} that have a unique longest increasing subsequence and a unique longest decreasing subsequence.

Original entry on oeis.org

1, 0, 0, 0, 2, 16, 120, 938, 8014, 74060, 748628, 8163156, 96429784
Offset: 1

Views

Author

Manfred Scheucher, Jun 07 2015

Keywords

Comments

By definition, a(n) <= A167995(n).

Examples

			the two permutation of {1,2,...,5}:
{2, 5, 3, 1, 4}
{4, 1, 3, 5, 2}
8 of the 16 permutations of {1,2,...,6} (others reversed):
{1, 3, 6, 4, 2, 5}
{1, 5, 2, 4, 6, 3}
{2, 3, 6, 4, 1, 5}
{2, 5, 3, 1, 4, 6}
{2, 6, 3, 1, 4, 5}
{2, 6, 5, 3, 1, 4}
{3, 6, 4, 2, 1, 5}
{3, 6, 4, 2, 5, 1}
		

Crossrefs

Programs

  • Sage
    def A258683(n):
        return len([p for p in permutations(n) if len(p.longest_increasing_subsequences())* len(p.reverse().longest_increasing_subsequences())==1])
    # Manfred Scheucher, Jun 07 2015