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.

A113227 Number of permutations of [n] avoiding the pattern 1-23-4.

Original entry on oeis.org

1, 1, 2, 6, 23, 105, 549, 3207, 20577, 143239, 1071704, 8555388, 72442465, 647479819, 6083742438, 59885558106, 615718710929, 6595077685263, 73424063891526, 847916751131054, 10138485386085013, 125310003360265231
Offset: 0

Views

Author

David Callan, Oct 19 2005

Keywords

Comments

a(n) is the number of permutations on [n] that avoid the mixed consecutive/scattered pattern 1-23-4 (also number that avoid 4-32-1).
From David Callan, Jul 25 2008: (Start)
a(n) appears to also count vertical-marked parallelogram polyominoes of perimeter 2n+2; vertical-marked means that for each vertical line that splits the polyomino into two nonempty polyominoes one of the unit segments on the common boundary is marked.
....._
..._|.|
._|...|
|.._|
For example, the polyomino above, with n=5, has two such vertical lines, the left line giving only one choice for marking and the right line giving two choices. (End)

Examples

			12534 contains a scattered 1-2-3-4 pattern (1234 itself) but not a 1-23-4 because the 2 and 3 are not adjacent in the permutation.
		

Programs

  • Mathematica
    v[n_, a_] := v[n, a] = Sum[StirlingS2[a-1, i-1]i^(n-a), {i, a}];
    u[0]=u[1]=1; u[n_]/; n>=2 := u[n] = Sum[u[n, a], {a, n}];
    u[1, 1]=u[2, 1]=u[2, 2]=1;
    u[n_, a_]/; n>=3 && a==n := u[n-1];
    u[n_, a_]/; n>=3 && a=3 && k==2 && a=3 && k>=3 && a=3 && k>=3 && a
    				

Formula

In the recurrence coded in Mathematica below, v[n, a] is the number of permutations on [n] that avoid the 3-letter pattern 1-23 and start with a; u[n, a, m, k] is the number of 1-23-4-avoiding permutations on [n] that start with a, have n in position k and for which m is the minimum of the first k-1 entries. In the last sum, j is the number of entries lying strictly between a and n both in value and position.
From Gary W. Adamson, Jul 08 2011: (Start)
a(n) = the upper left term in M^n, M = the production matrix:
1, 1
1, 2, 1
1, 2, 3, 1
1, 2, 3, 4, 1
1, 2, 3, 4, 5, 1
...
(End)
G.f.: 1+x/(U(0)-x) where U(k) = 1 - x*k - x/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 10 2012
Conjecture: a(n) = R(n-1, 0) for n > 0 with a(0) = 1 where R(n, q) = R(n-1, q+1) + Sum_{j=0..q} (j+1)*R(n-1, j) for n > 0, q >= 0 with R(0, q) = 1 for q >= 0. - Mikhail Kurkov, Jan 05 2024