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-4 of 4 results.

A246117 Number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 2, 5, 4, 1, 0, 4, 12, 13, 6, 1, 0, 12, 40, 51, 31, 9, 1, 0, 36, 132, 193, 144, 58, 12, 1, 0, 144, 564, 904, 769, 376, 106, 16, 1, 0, 576, 2400, 4180, 3980, 2273, 800, 170, 20, 1, 0, 2880, 12576, 23300, 24080, 15345, 6273, 1650, 270, 25, 1
Offset: 1

Views

Author

Peter Bala, Aug 14 2014

Keywords

Comments

An analog of the Stirling numbers of the first kind, A008275.
A permutation p of the set {1,2,...,n} is called a parity-preserving permutation if p(i) = i (mod 2) for i = 1,2,...,n. The set of all such permutations forms a subgroup of order A010551 of the symmetric group on n letters. This triangle gives the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles. An example is given below.
If we write a parity-preserving permutation p in one line notation as ( p(1) p(2) p(3)... p(n) ) then the first entry p(1) is odd and thereafter the entries alternate in parity. Thus the permutation p belongs to the set of parity-alternate permutations studied by Tanimoto.
The row generating polynomials form the polynomial sequence x, x^2, x^2*(x + 1), x^2*(x + 1)^2, x^2*(x + 1)^2*(x + 2), x^2*(x + 1)^2*(x + 2)^2, .... Except for differences in offset, this triangle is the Galton array G(floor(n/2),1) in the notation of Neuwirth with inverse array G(-floor(k/2),1). See A246118 for the unsigned version of the inverse array.
From Peter Bala, Apr 12 2018: (Start)
In the cycle decomposition of a parity preserving permutation, the entries in a given cycle are either all even or all odd. Define T(n,k,i), 1 <= i <= k-1, (a refinement of the table number T(n,k)) to be the number of parity preserving permutations of the set {1,2,...,n} with exactly k cycles and with i of the cycles having all even entries. Clearly, T(n,k) = Sum_{i = 1..k-1} T(n,k,i).
A simple combinatorial argument (cf. Dzhumadil'daev and Yeliussizov, Proposition 5.3) gives the recurrences
T(2*n,k,i) = T(2n-1,k-1,i-1) + (n-1)*T(2*n-1,k,i) and
T(2*n+1,k,i) = T(2*n,k-1,i) + n*T(2*n,k,i).
The solution to these recurrences for n >= 1 is T(2*n,k,i) = S1(n,i)*S1(n,k-i) and T(2*n+1,k,i) = S1(n,i)*S1(n+1,k-i), where S1(n,k) = |A008275(n,k)| denotes the (unsigned) Stirling cycle numbers of the first kind. Kotesovec's formula for T(n,k) below follows immediately from this. Cf. A274310. (End)
Triangle of allowable Stirling numbers of the first kind (with a different offset). See Cai and Readdy, Table 4. - Peter Bala, Apr 14 2018

Examples

			Triangle begins
n\k| 1   2    3    4    5   6   7   8
= = = = = = = = = = = = = = = = = = =
1  | 1
2  | 0   1
3  | 0   1    1
4  | 0   1    2    1
5  | 0   2    5    4    1
6  | 0   4   12   13    6   1
7  | 0  12   40   51   31   9   1
8  | 0  36  132  193  144  58  12  1
...
n = 5: The 12 parity-preserving permutations of S_5 and their cycle structure are shown in the table below.
= = = = = = = = = = = = = = = = = = = = = = = = = =
Parity-preserving      Cycle structure     # cycles
permutation
= = = = = = = = = = = = = = = = = = = = = = = = = =
54123                   (153)(24)              2
34521                   (135)(24)              2
34125                   (13)(24)(5)            3
14523                   (1)(24)(35)            3
32541                   (135)(2)(4)            3
52143                   (153)(2)(4)            3
54321                   (15)(24)(3)            3
32145                   (13)(2)(4)(5)          4
14325                   (1)(24)(3)(5)          4
12543                   (1)(2)(35)(4)          4
52341                   (15)(2)(3)(4)          4
12345                   (1)(2)(3)(4)(5)        5
= = = = = = = = = = = = = = = = = = = = = = = = = =
This gives row 5 as [2, 5, 4, 1] with generating function 2*x^2 + 5*x^3 + 4*x^4 + x^5 = ( x*(x + 1) )^2 * (x + 2).
		

Crossrefs

A002620 (1st subdiagonal), A008275, A010551 (row sums and column k = 2), A125300, A203151 (column k = 3), A203246 (2nd subdiagonal), A246118 (unsigned matrix inverse).

Programs

  • Maple
    A246117 := proc(n,k)
        if n = k then
            1;
        elif k <= 1 or k > n then
            0;
        else
            floor((n-1)/2)*procname(n-1,k)+procname(n-1,k-1) ;
        end if;
    end proc:
    seq(seq(A246117(n,k),k=1..n),n=1..8) ; # R. J. Mathar, Oct 01 2016
  • Mathematica
    Flatten[{1,Rest[Table[Table[(-1)^(n-k) * Sum[StirlingS1[Floor[(n+1)/2],j] * StirlingS1[Floor[n/2],k-j],{j,1,k-1}],{k,1,n}],{n,1,12}]]}] (* Vaclav Kotesovec, Feb 09 2015 *)

Formula

Recurrence equations: T(1,1) = 1, T(n,1) = 0 for n >= 2; T(n,k) = 0 for k > n; otherwise T(n+1,k) = floor(n/2)*T(n,k) + T(n,k-1).
Row generating polynomials R(n,x): R(2*n,x) = ( x*(x + 1)*...*(x + n - 1) )^2; R(2*n + 1,x) = R(2*n,x)*(x + n) with the convention R(0,x) = 1.
Row sums: A010551; Column 3: A203151;
First subdiagonal: A002620; 2nd subdiagonal: A203246.
T(n,k) = (-1)^(n-k) * Sum_{j=1..k-1} Stirling1(floor((n+1)/2),j) * Stirling1(floor(n/2),k-j), for k>1. - Vaclav Kotesovec, Feb 09 2015

A203298 Second elementary symmetric function of the first n terms of (1,2,2,3,3,4,4,5,5...).

Original entry on oeis.org

2, 8, 23, 47, 91, 151, 246, 366, 540, 750, 1037, 1373, 1813, 2317, 2956, 3676, 4566, 5556, 6755, 8075, 9647, 11363, 13378, 15562, 18096, 20826, 23961, 27321, 31145, 35225, 39832, 44728, 50218, 56032, 62511, 69351, 76931, 84911, 93710, 102950
Offset: 2

Views

Author

Clark Kimberling, Dec 31 2011

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Floor[(k + 2)/2]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[2, t[n]]
    Table[a[n], {n, 2, 50}]  (* A203298 *)

Formula

Empirical g.f.: x^2*(2 + 4*x + 3*x^2 - 3*x^3 - x^4 + x^5) / ((1 - x)^5*(1 + x)^3). - Colin Barker, Aug 15 2014
Conjectures from Colin Barker, Jan 04 2018: (Start)
a(n) = (6*n^4 + 40*n^3 + 48*n^2 - 112*n) / 192 for n even.
a(n) = (6*n^4 + 40*n^3 + 36*n^2 - 136*n + 54) / 192 for n odd.
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8) for n>9.
(End)

A203299 Second elementary symmetric function of the first n terms of (2,2,3,3,4,4,5,5...).

Original entry on oeis.org

4, 16, 37, 77, 133, 223, 338, 506, 710, 990, 1319, 1751, 2247, 2877, 3588, 4468, 5448, 6636, 7945, 9505, 11209, 13211, 15382, 17902, 20618, 23738, 27083, 30891, 34955, 39545, 44424, 49896, 55692, 62152, 68973, 76533, 84493, 93271, 102490
Offset: 2

Views

Author

Clark Kimberling, Dec 31 2011

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Floor[(k + 3)/2]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[2, t[n]]
    Table[a[n], {n, 2, 50}]  (* A203299 *)

Formula

Empirical g.f.: -x^2*(x+2)*(x^4-x^3-3*x^2+3*x+2) / ((x-1)^5*(x+1)^3). - Colin Barker, Aug 15 2014
Empirical: a(n) = n^3/3 +25*n^2/32 -23*n/24 -11/64 +n^4/32 +(-1)^n* (-n^2/32 -n/8 +11/64). - R. J. Mathar, Oct 01 2016

A203151 (n-1)-st elementary symmetric function of {1,1,2,2,3,3,4,4,5,5,...,Floor[(n+1)/2]}.

Original entry on oeis.org

1, 2, 5, 12, 40, 132, 564, 2400, 12576, 65760, 408960, 2540160, 18299520, 131725440, 1079205120, 8836853760, 81157386240, 745047797760, 7582159872000, 77138417664000, 861690783744000, 9623448705024000, 117074735382528000
Offset: 1

Views

Author

Clark Kimberling, Dec 29 2011

Keywords

Comments

Column 3 of A246117. - Peter Bala, Aug 15 2014
From R. J. Mathar, Oct 01 2016 (Start):
The k-th elementary symmetric functions of the repeated integers 1,1,2,2,..[(n+1)/2], form a triangle T(n,k), 0<=k<=n, n>=0:
1
1 1
1 2 1
1 4 5 2
1 6 13 12 4
1 9 31 51 40 12
which is a row-reversed version of A246117. This here is the first subdiagonal. The diagonal is A010551. The 2nd column is A002620, the 3rd A203246. (End)

Examples

			Let esf abbreviate "elementary symmetric function".  Then
0th esf of {2}:  1;
1st esf of {1,1}:  1+1=2;
2nd esf of {1,1,2} is 1*1+1*2+1*2=5.
		

Crossrefs

Programs

  • Mathematica
    f[k_] := Floor[(k + 1)/2]; t[n_] := Table[f[k], {k, 1, n}]
    a[n_] := SymmetricPolynomial[n - 1, t[n]]
    Table[a[n], {n, 1, 22}] (* A203151 *)
Showing 1-4 of 4 results.