A177553
Number of permutations of 1..n avoiding adjacent step pattern up, up, up, up, up, up.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5039, 40305, 362682, 3626190, 39881160, 478490760, 6219298800, 87055051511, 1305598835941, 20885951018102, 354999461960226, 6388879812001704, 121367620532150280, 2426930566055020080, 50956684690331669759, 1120852238721212726609
Offset: 0
- Alois P. Heinz, Table of n, a(n) for n = 0..450
- Mingjia Yang, Doron Zeilberger, Increasing Consecutive Patterns in Words, arXiv:1805.06077 [math.CO], 2018.
- Mingjia Yang, An experimental walk in patterns, partitions, and words, Ph. D. Dissertation, Rutgers University (2020).
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<5, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # Alois P. Heinz, Oct 07 2013
-
nn=20;r=6;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
Table[n!*SeriesCoefficient[1/(Sum[x^(7*k)/(7*k)!-x^(7*k+1)/(7*k+1)!,{k,0,n}]),{x,0,n}],{n,1,20}] (* Vaclav Kotesovec, Aug 29 2014 *)
A201692
Number of permutations that avoid the consecutive pattern 1423.
Original entry on oeis.org
1, 1, 2, 6, 23, 110, 631, 4218, 32221, 276896, 2643883, 27768955, 318174363, 3949415431, 52794067318, 756137263377, 11551672922816, 187507250145806, 3222662529113641, 58464560588277289, 1116469710152742025, 22386721651323946628, 470259350616967829363
Offset: 0
-
c := proc(n,l)
if n = 1 then
if l = 0 then
1;
else
0;
end if;
elif n= 2 or n = 3 then
0;
else
a := 0 ;
for k from 1 to (n-2)/2 do
a := a+procname(n-2*k-1,l-k)*binomial(n-k-2,k) ;
end do:
a ;
end if;
end proc:
A201693 := proc(nmax)
g := 1-t ;
for n from 2 to nmax do
for l from 0 to n/2 do
g := g-c(n,l)*t^n*(-1)^l/n! ;
end do:
end do:
taylor(1/g,t=0,nmax) ;
end proc:
nmax := 25 ;
egf := A201693(nmax) ;
for n from 0 to nmax-1 do
printf("%d,",coeftayl(egf,t=0,n)*n!) ;
end do: # R. J. Mathar, Dec 04 2011
# second Maple program:
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, `if`(0 b(n, 0$2):
seq(a(n), n=0..25); # Alois P. Heinz, Nov 07 2013
-
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[b[u-j, o+j-1, If[0Jean-François Alcover, Mar 18 2014, after Alois P. Heinz *)
A201693
Number of permutations that avoid the consecutive pattern 2413.
Original entry on oeis.org
1, 1, 2, 6, 23, 110, 632, 4237, 32465, 279828, 2679950, 28232972, 324470844, 4039771856, 54165468774, 778128659247, 11923645252411, 194131328012012, 3346615262190736, 60897160676005110, 1166446154857250412, 23459656378909613446, 494290181112325561351
Offset: 0
A230231
Number of permutations of [n] avoiding adjacent step pattern {up}^8.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362879, 3628781, 39916492, 478996716, 6226941864, 87176969880, 1307651304960, 20922368987520, 355679390626560, 6402213152423659, 121641748198554547, 2432828930036156696, 51089280818439941448, 1123961390341566969192
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<7, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30);
-
nn=20;r=8;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
CoefficientList[Series[1/(HypergeometricPFQ[{}, {1/9, 2/9, 1/3, 4/9, 5/9, 2/3, 7/9, 8/9}, x^9/387420489] - x*HypergeometricPFQ[{}, {2/9, 1/3, 4/9, 5/9, 2/3, 7/9, 8/9, 10/9}, x^9/387420489]), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Feb 01 2015 *)
A230232
Number of permutations of [n] avoiding adjacent step pattern {up}^9.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628799, 39916779, 479001228, 6227014404, 87178179816, 1307672369640, 20922752672640, 355686706327680, 6402359109968640, 121644792614741760, 2432895242801771955, 51090787299486057355, 1123997039003038423610
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<8, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30);
-
nn=20;r=9;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
FullSimplify[CoefficientList[Series[10/(2/E^x - Sqrt[2*(5 - Sqrt[5])]* Cosh[(1/4)*(1 + Sqrt[5])*x]* Sin[Sqrt[(1/8)*(5 - Sqrt[5])]*x] - Sqrt[2*(5 + Sqrt[5])]*Cosh[(1/4)*(Sqrt[5] - 1)* x]*Sin[Sqrt[(1/8)*(5 + Sqrt[5])]*x] + Cos[Sqrt[(1/8)*(5 + Sqrt[5])]*x]* (4*Cosh[(1/4)*(Sqrt[5] - 1)*x] - (Sqrt[5] - 1)*Sinh[(1/4)*(Sqrt[5] - 1)*x]) - Cos[Sqrt[(1/8)*(5 - Sqrt[5])]*x]* ((1 + Sqrt[5])*Sinh[(1/4)*(1 + Sqrt[5])*x] - 4*Cosh[(1/4)*(1 + Sqrt[5])*x])), {x, 0, 20}], x] * Range[0, 20]!] (* Vaclav Kotesovec, Jan 31 2015 *)
A230233
Number of permutations of [n] avoiding adjacent step pattern {up}^10.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916799, 479001577, 6227020358, 87178283010, 1307674215120, 20922786961440, 355687370176320, 6402372516146880, 121645075013280000, 2432901444395385600, 51090929159028595200, 1124000415686590747031
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<9, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30);
-
nn=20;r=10;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
CoefficientList[Series[1/(HypergeometricPFQ[{}, {1/11, 2/11, 3/11, 4/11, 5/11, 6/11, 7/11, 8/11, 9/11, 10/11}, x^11/285311670611] - x*HypergeometricPFQ[{}, {2/11, 3/11, 4/11, 5/11, 6/11, 7/11, 8/11, 9/11, 10/11, 12/11}, x^11/285311670611]), {x, 0, 25}], x] * Range[0, 25]! (* Vaclav Kotesovec, Jan 17 2015 *)
A217057
Number of permutations in S_n containing exactly one increasing subsequence of length 4.
Original entry on oeis.org
0, 0, 0, 0, 1, 12, 102, 770, 5545, 39220, 276144, 1948212, 13817680, 98679990, 710108396, 5150076076, 37641647410, 277202062666, 2056218941678, 15358296210724, 115469557503753, 873561194459596, 6647760790457218, 50871527629923754, 391345137795371013
Offset: 0
a(4) = 1: 1234.
a(5) = 12: 12453, 12534, 13425, 13452, 14235, 15234, 23145, 23415, 23451, 31245, 41235, 51234.
- Brian Nakamura and Doron Zeilberger, Table of n, a(n) for n = 0..70
- Andrew R. Conway and Anthony J. Guttmann, Counting occurrences of patterns in permutations, arXiv:2306.12682 [math.CO], 2023. See p. 16.
- Brian Nakamura and Doron Zeilberger, Using Noonan-Zeilberger Functional Equations to enumerate (in Polynomial Time!) Generalized Wilf classes; Local copy, pdf file only, no active links
- Brian Nakamura and Doron Zeilberger, Using Noonan-Zeilberger Functional Equations to enumerate (in Polynomial Time!) Generalized Wilf classes, arXiv preprint arXiv:1209.2353, 2012.
- Wikipedia, Enumerations of specific permutation classes
- Wikipedia, Subsequence
A071077
Number of permutations that avoid the generalized pattern 1234-5.
Original entry on oeis.org
1, 1, 2, 6, 24, 119, 705, 4857, 38142, 336291, 3289057, 35337067, 413698248, 5241768017, 71465060725, 1043175024243, 16231998346794, 268207096127991, 4690005160446721, 86528908665043683, 1679764981327051508, 34226671269330933413, 730361830628447403029
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(
`if`(t=2 and o>j, 0, b(u+j-1, o-j, t+1)), j=1..o)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..25); # Alois P. Heinz, Nov 14 2015
-
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Sum[If[t == 2 && o>j, 0, b[u+j-1, o-j, t+1]], {j, 1, o}] + Sum[b[u-j, o+j-1, 0], {j, 1, u}]];
a[n_] := b[n, 0, 0];
a /@ Range[0, 25] (* Jean-François Alcover, Apr 23 2020, after Alois P. Heinz *)
A220183
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k triple descents (n>=0,0<=k<=n-3). We say that i is a triple descent of a permutation p if p(i) > p(i+1) > p(i+2) > p(i+3).
Original entry on oeis.org
1, 1, 2, 6, 23, 1, 111, 8, 1, 642, 67, 10, 1, 4326, 602, 99, 12, 1, 33333, 5742, 1093, 137, 14, 1, 288901, 59504, 12425, 1852, 181, 16, 1, 2782082, 666834, 151635, 24970, 3029, 231, 18, 1, 29471046, 8054684, 1981499, 355906, 48455, 4902, 287, 20, 1
Offset: 0
: 1;
: 1;
: 2;
: 6;
: 23, 1;
: 111, 8, 1;
: 642, 67, 10, 1;
: 4326, 602, 99, 12, 1;
: 33333, 5742, 1093, 137, 14, 1;
T(5,1) = 8 because we have: (4,5,3,2,1), (3,5,4,2,1), (2,5,4,3,1), (5,4,3,1,2), (1,5,4,3,2), (5,4,2,1,3), (5,3,2,1,4), (4,3,2,1,5).
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
add(b(u-j, o+j-1, 1), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3][t])*`if`(t=3, x, 1), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
seq(T(n), n=0..14); # Alois P. Heinz, Oct 29 2013
-
nn=10; u=y-1; a=Apply[Plus, Table[Normal[Series[y x^4/(1-y x - y x^2-y x^3), {x,0,nn}]][[n]]/(n+3)!, {n,1,nn-3}]]/.y->u; Range[0,nn]! CoefficientList[Series[1/(1-x-a), {x,0,nn}], {x,y}]//Grid
A254523
Number of permutations of [n] avoiding adjacent step pattern {up}^11.
Original entry on oeis.org
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001599, 6227020775, 87178290682, 1307674357710, 20922789683040, 355687423926240, 6402373618334400, 121645098513933120, 2432901965590252800, 51090941178938707200, 1124000703770606323200
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t<10, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
add(b(u-j, o+j-1, 0), j=1..u))
end:
a:= n-> b(n, 0, 0):
seq(a(n), n=0..30); # after Alois P. Heinz
-
CoefficientList[Series[6 / (Exp[-x] + Cos[x] + 2*Cos[x/2] * Cosh[Sqrt[3]*x/2] - Cosh[Sqrt[3]*x/2]*Sin[x/2] - Sin[x] + Cosh[x/2] * (2*Cos[Sqrt[3]*x/2] - Sqrt[3]*Sin[Sqrt[3]*x/2]) - Cos[Sqrt[3]*x/2]*Sinh[x/2] - Sqrt[3]*Cos[x/2]*Sinh[Sqrt[3]*x/2]), {x, 0, 25}], x] * Range[0, 25]!
Comments