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.

User: Miklos Bona

Miklos Bona's wiki page.

Miklos Bona has authored 8 sequences.

A309563 Cyclic permutations of length n that avoid the patterns 123 and 231.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 2, 4, 6, 2, 2, 6, 8, 4, 4, 6, 10, 4, 4, 10, 12, 4, 4, 12, 18, 6, 6, 8, 12, 8, 8, 16, 22, 6, 6, 18, 22, 8, 8, 12, 22, 10, 10, 22, 26, 8, 8, 20, 32, 12, 12, 18, 24, 12, 12, 28, 36, 8, 8, 30, 38, 16, 16, 20, 36, 16, 16, 24, 30, 12, 12, 36, 54
Offset: 1

Author

Miklos Bona, Aug 07 2019

Keywords

Examples

			a(4)=1, since the only cyclic permutation of length 4 avoiding both 123 and 231 is (4231)=4312.
		

Crossrefs

Cf. A000010.

Formula

a(2)=1; a(n)=phi(n/2) if n=4k, a(n)=phi((n+2)/4) +phi(n/2) if n=4k+2 > 2, and a(n)=phi((n+1)/2) if n is odd, where phi is the Euler totient function.

A309508 Number of cyclic permutations of length n avoiding the pattern 321.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 24, 66, 178, 512, 1486, 4446, 13468, 41648, 130178, 412670, 1321418, 4274970, 13948966, 45890440, 152061154, 507292698, 1702753462, 5748085332, 19506240462
Offset: 0

Author

Miklos Bona, Aug 05 2019

Keywords

Comments

Comment from F. Chapoton, Sep 14 2021: (Start)
The maps sending a permutation to its inverse or to its reverse-complement define two commuting involutions on these sets of permutations.
The next terms in the sequence could be 41648, 130178, though these are counting Dyck words such that an associated permutation is cyclic, related but not obviously equivalent combinatorial objects. (End)

Examples

			For n=3, there are two such permutations, 231 and 312.
The a(4) = 4 permutations are: 2341, 2413, 3142, 4123.
The a(5) = 10 permutations are: 23451, 23514, 24153, 25134, 31452, 31524, 34512, 41253, 45123, 51234.
		

Crossrefs

Cf. A000108 (number of permutations avoiding 321).

Programs

  • PARI
    \\ See PARI link in A309504 for program code.
    for(n=0, 16, print1(E321(n), ", ")) \\ Andrew Howroyd, Nov 20 2024

Extensions

a(0)=1 prepended and a(13)-a(24) from Andrew Howroyd, Nov 17 2024

A309506 Number of cyclic permutations of length n avoiding the pattern 231 (equivalently, 312).

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 12, 30, 86, 253, 748, 2274, 7152, 22890, 74189, 243342, 808599, 2716549, 9213420, 31498358, 108483093, 376145636, 1312463081, 4605569378, 16245866825
Offset: 0

Author

Miklos Bona, Aug 05 2019

Keywords

Examples

			For n=4, there are two such permutations, 4123 and 4312.
The a(5) = 5 permutations are 51234, 51423, 53124, 54132, 54213.
		

Crossrefs

Cf. A000108 (number of permutations avoiding 231).

Programs

  • PARI
    \\ See PARI link in A309504 for program code.
    for(n=0, 16, print1(E231(n), ", ")) \\ Andrew Howroyd, Nov 20 2024

Extensions

a(1)=1 (confirmed by author) inserted by Alexander Burstein, Jul 20 2020
a(0)=1 prepended and a(13)-a(24) from Andrew Howroyd, Nov 20 2024

A309505 Number of cyclic permutations of length n that avoid the pattern 132 (equivalently, 213).

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 24, 68, 182, 544, 1574, 4888, 14864, 47610, 149964, 491802, 1592198, 5318936, 17593170, 59679516, 200805614, 689988886, 2354489616, 8178944510, 28240716098
Offset: 0

Author

Miklos Bona, Aug 05 2019

Keywords

Examples

			For n=3, there are two such permutations, 231 and 312.
The a(4) = 4 permutations are: 2341, 3421, 4123, 4312.
The a(5) = 10 permutations are: 23451, 34251, 34512, 43521, 45123, 45231, 51234, 53124, 53412, 54213.
		

Crossrefs

Cf. A000108 (number of permutations avoiding 132).

Programs

  • PARI
    \\ See PARI link in A309504 for program code.
    for(n=1, 16, print1(E213(n), ", ")) \\ Andrew Howroyd, Nov 20 2024

Extensions

a(0)=1 prepended and a(13)-a(24) from Andrew Howroyd, Nov 20 2024

A309504 Number of cyclic permutations of length n avoiding the pattern 123.

Original entry on oeis.org

1, 1, 1, 2, 4, 10, 24, 68, 188, 586, 1722, 5492, 16924, 55582, 177278, 594460, 1944980, 6628384, 22132112, 76421498, 259359036, 905416294, 3114033930, 10971347070, 38157201530
Offset: 0

Author

Miklos Bona, Aug 05 2019

Keywords

Examples

			For n=3, there are two such permutations, 231 and 312.
The a(4) = 4 permutations are: 2413, 3142, 3421, 4312.
The a(5) = 10 permutations are: 25413, 35214, 35421, 41532, 43152, 43521, 45231, 53412, 54132, 54213.
		

Crossrefs

Cf. A000108 (number of permutations avoiding 123).

Programs

  • PARI
    \\ See Links for program code.
    for(n=0, 16, print1(E123(n), ", ")) \\ Andrew Howroyd, Nov 20 2024

Extensions

a(0)=1 prepended and a(13)-a(24) from Andrew Howroyd, Nov 17 2024

A032351 Number of permutations of length n which avoid the patterns 2143, 1324 (smooth permutations); or avoid the patterns 1342, 2431; etc.

Original entry on oeis.org

1, 1, 2, 6, 22, 88, 366, 1552, 6652, 28696, 124310, 540040, 2350820, 10248248, 44725516, 195354368, 853829272, 3733693872, 16333556838, 71476391800, 312865382004, 1369760107576, 5998008630244, 26268304208032, 115055864102504, 503997820344464, 2207927106851580, 9673223726469136, 42382192892577128, 185702341264971696
Offset: 0

Author

Keywords

Examples

			1 + x + 2*x^2 + 6*x^3 + 22*x^4 + 88*x^5 + 366*x^6 + 1552*x^7 + ...
		

References

  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.47.
  • R. P. Stanley, Catalan Numbers, Cambridge, 2015, p. 133.

Crossrefs

Cf. A053617.

Programs

  • Maple
    t1:=(1-5*x+3*x^2+x^2*sqrt(1-4*x))/(1-6*x+8*x^2-4*x^3);
    series(t1,x,40);
    seriestolist(%); # N. J. A. Sloane, Nov 09 2016
  • Mathematica
    Table[(Sum[(m+3)*(Sum[Sum[2^j*Binomial[j+k, k]*Binomial[m-j, 2*k+1], {j, 0, m-2*k-1}], {k, 0, m/2}]) * Binomial[2*n-m-2, n], {m, 0, n-2}] + Binomial[2*n, n])/(n+1),{n,0,20}] (* Vaclav Kotesovec, Sep 19 2014, after Vladimir Kruchinin *)
  • Maxima
    a(n):=(sum((m+3)*(sum(sum(2^(j)*binomial(j+k,k)*binomial(m-j,2*k+1),j,0,m-2*k-1),k,0,m/2))*binomial(2*n-m-2,n),m,0,n-2)+binomial(2*n,n))/(n+1); /* Vladimir Kruchinin, Sep 19 2014 */
  • PARI
    x='x+O('x^44) /* that many terms */
    gf=(1-5*x+3*x^2+x^2*sqrt(1-4*x))/(1-6*x+8*x^2-4*x^3);
    Vec(gf) /* show terms */ /* Joerg Arndt, Apr 20 2011 */
    

Formula

G.f.: (1-5*x+3*x^2+x^2*sqrt(1-4*x))/(1-6*x+8*x^2-4*x^3).
G.f.: 1 / (1 - x / (1 - x / (1 - 2*x / (1 - x / (1 - x / (1 - x / (1 - x / ...))))))). - Michael Somos, Apr 18 2012
From Gary W. Adamson, Jul 11 2011: (Start)
a(n) = upper left term in n-th power of the following infinite square production matrix:
1, 1, 0, 0, 0, 0, ...
1, 2, 1, 0, 0, 0, ...
1, 3, 1, 1, 0, 0, ...
1, 4, 1, 1, 1, 0, ...
1, 5, 1, 1, 1, 1, ...
...
(End)
HANKEL transform is A011782. HANKEL transform of a(n+1) is A011782(n+1). INVERT transform of A026671 with 1 prepended. - Michael Somos, Apr 18 2012
Recurrence: (n-2)*a(n) = 2*(5*n-13)*a(n-1) - 4*(8*n-25)*a(n-2) + 12*(3*n-10)*a(n-3) - 8*(2*n-7)*a(n-4). - Vaclav Kotesovec, Aug 24 2014
a(n) ~ 1/11 * (1 - 5*r + 3*r^2 + r^2*sqrt(1-4*r)) *(25 - 44*r + 24*r^2) / r^n, where r = 1/6*(4 - 2/(-17 + 3*sqrt(33))^(1/3) + (-17 + 3*sqrt(33))^(1/3)) = 0.228155493653961819214572... is the root of the equation -1 + 6*r - 8*r^2 + 4*r^3 = 0. - Vaclav Kotesovec, Aug 24 2014
a(n) = (Sum_{m=0..n-2} (m+3)*(Sum_{k=0..m/2} Sum_{j=0..m-2*k-1} 2^j * binomial(j+k, k) * binomial(m-j, 2*k+1)) * binomial(2*n-m-2,n) + binomial(2*n,n))/(n+1). - Vladimir Kruchinin, Sep 19 2014

Extensions

More terms from Erich Friedman

A026671 Number of lattice paths from (0,0) to (n,n) with steps (0,1), (1,0) and, when on the diagonal, (1,1).

Original entry on oeis.org

1, 3, 11, 43, 173, 707, 2917, 12111, 50503, 211263, 885831, 3720995, 15652239, 65913927, 277822147, 1171853635, 4945846997, 20884526283, 88224662549, 372827899079, 1576001732485, 6663706588179, 28181895551161, 119208323665543, 504329070986033, 2133944799315027
Offset: 0

Keywords

Comments

1, 1, 3, 11, 43, 173, ... is the unique sequence for which both the Hankel transform of the sequence itself and the Hankel transform of its left shift are the powers of 2 (A000079). For example, det[{{1, 1, 3}, {1, 3, 11}, {3, 11, 43}}] = det[{{1, 3, 11}, {3, 11, 43}, {11, 43, 173}}] = 4. - David Callan, Mar 30 2007
From Paul Barry, Jan 25 2009: (Start)
a(n) is the image of F(2n+2) under the Catalan matrix (1,xc(x)) where c(x) is the g.f. of A000108.
The sequence 1,1,3,... is the image of A001519 under (1,xc(x)). This sequence has g.f. given by 1/(1-x-2x^2/(1-3x-x^2/(1-2x-x^2/(1-2x-x^2/(1-... (continued fraction). (End)
Binomial transform of A111961. - Philippe Deléham, Feb 11 2009
From Paul Barry, Nov 03 2010: (Start)
The sequence 1,1,3,... has g.f. 1/(1-x/sqrt(1-4x)), INVERT transform of A000984.
It is an eigensequence of the sequence array for A000984. (End)

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

a(n) = T(2n-1, n-1), T given by A026736.
a(n) = T(2n, n), T given by A026670.
a(n) = T(2n+1, n+1), T given by A026725.
Row sums of triangle A054335.

Programs

  • GAP
    a:=[3,11,43];; for n in [4..30] do a[n]:=(2*(4*n-3)*a[n-1] - 3*(5*n-8)*a[n-2] - 2*(2*n-3)*a[n-3])/n; od; Concatenation([1], a); # G. C. Greubel, Jul 16 2019
  • Magma
    R:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( 1/(Sqrt(1-4*x)-x) )); // G. C. Greubel, Jul 16 2019
    
  • Mathematica
    Table[SeriesCoefficient[1/(Sqrt[1-4*x]-x),{x,0,n}],{n,0,30}] (* Vaclav Kotesovec, Oct 08 2012 *)
  • PARI
    {a(n)= if(n<0, 0, polcoeff( 1/(sqrt(1 -4*x +x*O(x^n)) -x), n))} /* Michael Somos, Apr 20 2007 */
    
  • PARI
    my(x='x+O('x^66)); Vec( 1/(sqrt(1-4*x)-x) ) \\ Joerg Arndt, May 04 2013
    
  • Sage
    (1/(sqrt(1-4*x)-x)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jul 16 2019
    

Formula

From Wolfdieter Lang, Mar 21 2000: (Start)
G.f.: 1/(sqrt(1-4*x)-x).
a(n) = Sum_{i=1..n} a(i-1)*binomial(2*(n-i), n-i) + binomial(2*n, n), n >= 1, a(0)=1. (End)
G.f.: 1/(1 -x -2*x*c(x)) where c(x) = g.f. for Catalan numbers A000108. - Michael Somos, Apr 20 2007
From Paul Barry, Jan 25 2009: (Start)
G.f.: 1/(1 - 3xc(x) + x^2*c(x)^2);
G.f.: 1/(1-3x-2x^2/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-... (continued fraction).
a(0) = 1, a(n) = Sum_{k=0..n} (k/(2n-k))*C(2n-k,n-k)*F(2k+2). (End)
a(n) = Sum_{k=0..n} A039599(n,k) * A000045(k+2). - Philippe Deléham, Feb 11 2009
From Paul Barry, Feb 08 2009: (Start)
G.f.: 1/(1-x/(1-2x/(1-x/(1-x/(1-x/(1-x/(1-x/(1-... (continued fraction);
G.f. of 1,1,3,... is 1/(1-x-2x/(1-x/(1-x/(1-x/(1-... (continued fraction). (End)
From Gary W. Adamson, Jul 14 2011: (Start)
a(n) = the upper left term in M^n, M = the infinite square production matrix:
3, 2, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
1, 1, 1, 1, 0, 0, ...
1, 1, 1, 1, 1, 0, ...
1, 1, 1, 1, 1, 1, ...
... (End)
From Vaclav Kotesovec, Oct 08 2012: (Start)
D-finite with recurrence: n*a(n) = 2*(4*n-3)*a(n-1) - 3*(5*n-8)*a(n-2) - 2*(2*n-3)*a(n-3).
a(n) ~ (2+sqrt(5))^n/sqrt(5). (End)
a(n) = Sum_{k=0..n+1} 4^(n+1-k) * binomial(n-k/2,n+1-k). - Seiichi Manyama, Mar 30 2025
From Peter Luschny, Mar 30 2025: (Start)
a(n) = 4^n*(binomial(n-1/2, n)*hypergeom([1, (1-n)/2, -n/2], [1/2, 1/2-n], -1/4) + hypergeom([(1-n)/2, 1-n/2], [1-n], -1/4)/4) for n > 0.
a(n) = A001076(n) + A176280(n). (End)

A022558 Number of permutations of length n avoiding the pattern 1342.

Original entry on oeis.org

1, 1, 2, 6, 23, 103, 512, 2740, 15485, 91245, 555662, 3475090, 22214707, 144640291, 956560748, 6411521056, 43478151737, 297864793993, 2059159989914, 14350039389022, 100726680316559, 711630547589023, 5057282786190872, 36132861123763276, 259423620328055093
Offset: 0

Author

Keywords

Comments

Differs from A117156 which counts permutations avoiding the *consecutive* pattern 1342. - Ray Chandler, Dec 06 2011
Also, number of permutation of length n avoiding the pattern 3142 (see Stankova (1994) below). - Alexander Burstein, Aug 09 2013
Conjecture: a(n) is the number of permutations of length n simultaneously avoiding patterns 2143 and 415263. - Alexander Burstein, Mar 21 2019

Examples

			a(4) = 23 because obviously all permutations of length 4 with the exception of 1342 avoid 1342.
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 768, Th. 12.1.14.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 6.48.

Crossrefs

Essentially the same as A004040.
Cf. A117158.
A005802, A022558, A061552 are representatives for the three Wilf classes for length-four avoiding permutations (cf. A099952).

Programs

  • Maple
    a := proc (n) options operator, arrow: (1/2)*(-1)^(n-1)*(7*n^2-3*n-2)+3*(sum((-1)^(n-i)*2^(i+1)*factorial(2*i-4)*binomial(n-i+2, 2)/(factorial(i)*factorial(i-2)), i = 2 .. n)) end proc: seq(a(n), n = 0 .. 30); # Emeric Deutsch, Oct 15 2014
  • Mathematica
    Table[SeriesCoefficient[32*x/(1+20*x-8*x^2-(1-8*x)^(3/2)),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 07 2012 *)
    Table[1/2*(-1)^(n-1) * (-2-3*n+7*n^2) + 1/4*(-1)^n * (1+n) * (-2-13*n+(n+2) * Hypergeometric2F1[-3/2,-n,-2-n,-8]),{n,0,20}] (* Vaclav Kotesovec, Aug 24 2014 *)
  • PARI
    x='x+O('x^66); Vec( 32*x/(1+20*x-8*x^2-(1-8*x)^(3/2)) ) \\ Joerg Arndt, May 04 2013

Formula

a(n) = (7*n^2-3*n-2)/2 * (-1)^(n-1) + 3*Sum_{i=2..n} 2^(i+1) * (2*i-4)!/(i!*(i-2)!) * binomial(n-i+2, 2) * (-1)^(n-i).
G.f.: 32*x/(1 + 20*x - 8*x^2 - (1 - 8*x)^(3/2)). - Emeric Deutsch, Mar 13 2004
Recurrence: n*a(n) = (7*n-22)*a(n-1) + 4*(2*n-1)*a(n-2). - Vaclav Kotesovec, Oct 07 2012
a(n) ~ 2^(3*n+6)/(243*sqrt(Pi)*n^(5/2)). - Vaclav Kotesovec, Oct 07 2012

Extensions

Minor edits by Vaclav Kotesovec, Aug 24 2014