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.

Showing 1-3 of 3 results.

A249560 Number of length n permutations avoiding (231,{1},{}) and (132,{},{2}).

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 58, 163, 485, 1519, 4985, 17077, 60871, 225152, 862150, 3410641, 13913800, 58440010, 252348913, 1118802690, 5086910935, 23693925911, 112947299251, 550527774738, 2741489275969, 13936841789100, 72277551806634, 382134348251357, 2058420014680378
Offset: 0

Views

Author

Christian Bean, Nov 01 2014

Keywords

Comments

(231,{1},{}) is a vincular pattern. It has underlying classical pattern 231 and the extra requirement that the 2 and the 3 are adjacent in the permutation.
(132,{},{2}) is a co-vincular pattern. It has underlying classical pattern 132 and the extra requirement that the 2 and 3 are exactly one apart in the permutation.

Crossrefs

Formula

if i = 1: a(n,k,i) = sum( a(n-1,k,j) for j in [1..k] )
if i = k: a(n,k,i) = sum( a(n-1,k-1,j) + a(n-1,k,j) for j in [1..k-1] )
otherwise: a(n,k,i) = sum( a(n-1,k,j) for j in [1..i-1] )
where n is the length, k is the number of right to left minima and i is the position of the maximum in relation to the right to left minima.
Initial Conditions: if k > n or i > k then a(n,k,i) = 0, if k = 1 then a(n,k,i) = 1.
Then a(n) = sum( sum( a(n,k,i) for i in [1..k]) for k in [1..n] ).
G.f: 1 + x * sum(x^n * F_n(1+x) for n >= 0) where F_n(q) = sum( [n,m] for m in [0..n] ). Note [n,m] is the q-binomial. - Christian Bean, Jun 03 2015

Extensions

More terms from Alois P. Heinz, Nov 01 2014

A249561 Number of length n permutations avoiding (123,{1},{}) and (231,{},{2}).

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 57, 155, 440, 1299, 3977, 12596, 41181, 138711, 480548, 1709714, 6238685, 23319998, 89199763, 348799322, 1393087403, 5678298218, 23603135064, 99984420371, 431347901729, 1894074165622, 8460557754681, 38424506440883, 177342850025592, 831413025268569, 3957592646327463
Offset: 0

Views

Author

Christian Bean, Nov 01 2014

Keywords

Comments

(123,{1},{}) is a vincular pattern. It has underlying classical pattern 123 and the extra requirement that the 1 and the 2 are adjacent in the permutation.
(231,{},{2}) is a co-vincular pattern. It has underlying classical pattern 231 and the extra requirement that the 2 and 3 are exactly one apart in the permutation.
These can be counted recursively in the following way. If you let n be the length, r be the number of left to right minima and i be the position of the leftmost point with respect to the left to right minima then we get that
a(n,r,1) = a(n-1,r,r) + a(n-1,r,1) + a(n-1,r-1,r-1)
a(n,r,r) = sum( a(n-1,r,j) for j in [1..r] )
a(n,r,i) = a(n-1,r,r) + sum( a(n-1,r,j) for j in [1..i] )
which with the initial conditions that n must be greater than or equal to r and r greater than or equal to i and a(n,1,1) = 1.
Then a(n) = sum( sum( a(n,r,i) for i in [1..r] ) for r in [1..n] ).

Crossrefs

Programs

  • Mathematica
    a[n_, r_, i_] := a[n, r, i] = Which[nJean-François Alcover, Dec 02 2014, translated and adapted from Sage code *)

Formula

G.f: 1 + x/(1-x) * sum( sum( x^(i+k) * F_n+1,k(1/(1-x)) for k in [0..n+1] ) for n >= 0 ) where F_n,k(q) = q^n * q^C(k,2) * [n-1,k-1] and [a,b] is the q-binomial. - Christian Bean, Jun 03 2015

A249562 Number of length n permutations avoiding (123,{2},{}) and (123,{},{1}).

Original entry on oeis.org

1, 1, 2, 5, 14, 43, 143, 509, 1921, 7631, 31725, 137412, 617822, 2874819, 13809305, 68331089, 347657464, 1815839759, 9722708061, 53301771604, 298854490602, 1712023130016, 10011533550216, 59714205975048, 363008132101658, 2247599137530241, 14164805684388087, 90810818671081267, 591921142070249872
Offset: 0

Views

Author

Christian Bean, Nov 01 2014

Keywords

Comments

(123,{2},{}) is a vincular pattern. It has underlying classical pattern 123 and the extra requirement that the 2 and the 3 are adjacent in the permutation.
(123,{},{1}) is a co-vincular pattern. It has underlying classical pattern 123 and the extra requirement that the 1 and 2 are exactly one apart in the permutation.

Crossrefs

Formula

If x appears after x-1 in the permutation then we say that x is a ceiling point.
if i = 1: aup(n,k,i,l) = sum( abar(n,k,i,l) for m in [0..k] )
otherwise: aup(n,k,i,l) = sum( abar(n-1,k,1,m) for m in [l..k] ) + sum( sum( adown(n-1,k,j,m) for m in [i..k]) for j in [1..i-1] )
abar(n,k,i,l) = sum( a(n-1,k-1,j,l-1) for j in [1..k-1] )
adown(n,k,i,l) = sum( aup(n-1,k,j,l) + adown(n-1,k,j,l) for j in [i..k] )
a(n,k,i,l) = aup(n,k,i,l) + adown(n,k,i,l) + abar(n,k,i,l)
where n is the length, k is the number of left to right minima, i is the position of the maximum, l is the position of the first ceiling point
aup implies that max is a ceiling point, abar implies that max is a left to right minimum and adown implies max is neither.
Initial conditions: if i > l or k > n or i > k or l > k then aup(n,k,i,l) = adown(n,k,i,l) = 0, if i < l or l <= 0 then aup(n,k,i,l) = 0, if n - k = 1 then a(n,k,i,l) = 1, if i does not equal 1 the abar(n,k,i,l) = 0, abar(n,n,1,0) = 1.
a(n) = sum( sum( sum( a(n,k,j,m) for m in [0..k] ) for j in [1..k] ) for k in [1..n] )
Showing 1-3 of 3 results.