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.

A363493 Number T(n,k) of partitions of [n] having exactly k parity changes within their blocks, n>=0, 0<=k<=max(0,n-1), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 6, 4, 1, 10, 18, 17, 6, 1, 25, 61, 68, 38, 10, 1, 75, 210, 292, 202, 83, 14, 1, 225, 778, 1252, 1116, 576, 170, 22, 1, 780, 3008, 5670, 5928, 3899, 1490, 341, 30, 1, 2704, 12219, 26114, 32382, 25320, 12655, 3856, 678, 46, 1, 10556, 52268, 126073, 177666, 163695, 98282, 39230, 9418, 1319, 62, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 2023

Keywords

Examples

			T(4,0) = 4: 13|24, 13|2|4, 1|24|3, 1|2|3|4.
T(4,1) = 6: 124|3, 12|3|4, 134|2, 1|23|4, 14|2|3, 1|2|34.
T(4,2) = 4: 123|4, 12|34, 14|23, 1|234.
T(4,3) = 1: 1234.
T(5,2) = 17: 1235|4, 123|4|5, 1245|3, 12|34|5, 125|3|4, 12|3|45, 1345|2, 134|25, 14|235, 14|23|5, 15|234, 1|234|5, 1|23|45, 145|2|3, 14|25|3, 1|25|34, 1|2|345.
Triangle T(n,k) begins:
     1;
     1;
     1,     1;
     2,     2,     1;
     4,     6,     4,     1;
    10,    18,    17,     6,     1;
    25,    61,    68,    38,    10,     1;
    75,   210,   292,   202,    83,    14,    1;
   225,   778,  1252,  1116,   576,   170,   22,   1;
   780,  3008,  5670,  5928,  3899,  1490,  341,  30,  1;
  2704, 12219, 26114, 32382, 25320, 12655, 3856, 678, 46, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A124419, A363511, A363588.
Row sums give A000110.
T(n+1,n) gives A000012.
T(n+2,n) gives A027383.
T(2n+1,n) gives A363495.

Programs

  • Maple
    b:= proc(n, x, y) option remember; `if`(n=0, 1,
         `if`(y=0, 0, expand(b(n-1, y-1, x+1)*y*z))+
            b(n-1, y, x)*x + b(n-1, y, x+1))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, x_, y_] := b[n, x, y] = If[n == 0, 1,
      If[y == 0, 0, Expand[b[n - 1, y - 1, x + 1]*y*z]] +
      b[n - 1, y, x]*x + b[n - 1, y, x + 1]];
    T[n_] := CoefficientList[b[n, 0, 0], z];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Sep 05 2023, after Alois P. Heinz *)

Formula

Sum_{k=0..max(0,n-1)} k * T(n,k) = A363496(n).

A152875 Number of permutations of {1,2,...,n} with all odd entries preceding all even entries or all even entries preceding all odd entries.

Original entry on oeis.org

1, 1, 2, 4, 8, 24, 72, 288, 1152, 5760, 28800, 172800, 1036800, 7257600, 50803200, 406425600, 3251404800, 29262643200, 263363788800, 2633637888000, 26336378880000, 289700167680000, 3186701844480000, 38240422133760000, 458885065605120000, 5965505852866560000
Offset: 0

Views

Author

Emeric Deutsch, Dec 15 2008

Keywords

Comments

a(n) = A152874(n,1).

Examples

			a(4)=8 because we have 1324, 1342, 3124, 3142, 2413, 2431, 4213 and 4231.
		

Crossrefs

Programs

  • Maple
    a := proc (n) if `mod`(n, 2) = 0 then 2*factorial((1/2)*n)^2 else 2*factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2) end if end proc: seq(a(n), n = 2 .. 25);
    # second Maple program:
    a:= n-> (h-> 2^signum(h)*h!*(n-h)!)(iquo(n, 2)):
    seq(a(n), n=0..27);  # Alois P. Heinz, May 23 2023
    # third Maple program:
    a:= proc(n) option remember; `if`(n<4, n*(n-1)/2+1,
           n*(n-1)*a(n-2)/4 +a(n-1)/2)
        end:
    seq(a(n), n=0..27);  # Alois P. Heinz, May 23 2023
  • Mathematica
    a[n_] := Which[n<2, 1, EvenQ[n], 2(n/2)!^2, True, 2((n-1)/2)!*((n+1)/2)!];
    Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Aug 16 2023 *)

Formula

a(2n) = 2n!^2; a(2n+1) = 2n!(n+1)! (for n>=2).
E.g.f.: 1+x+2*(4*sqrt(4-x^2)*arcsin(x/2) - 4x + 4x^2 + x^3 - x^4)/((2+x)*(2-x)^2).
D-finite with recurrence 4*a(n) -2*a(n-1) -n*(n-1)*a(n-2)=0. - R. J. Mathar, Jul 22 2022

Extensions

a(0)=a(1)=1 prepended by Alois P. Heinz, May 23 2023

A363180 Number of permutations of [2n] with n parity changes.

Original entry on oeis.org

1, 2, 8, 288, 10368, 1036800, 103680000, 20321280000, 3982970880000, 1290482565120000, 418116351098880000, 202368313931857920000, 97946263943019233280000, 66211674425481001697280000, 44759091911625157147361280000, 40283182720462641432625152000000
Offset: 0

Views

Author

Alois P. Heinz, May 23 2023

Keywords

Examples

			a(0) = 1: (), the empty permutation.
a(1) = 2: 12, 21.
a(2) = 8: 1243, 1423, 2134, 2314, 3241, 3421, 4132, 4312.
a(3) = 288: 123546, 123564, 124356, 124536, 125346, ..., 652431, 653241, 653421, 654213, 654231.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 2^n,
          (16*(n-2)^2*(2*n-1)*(n-1)^2*a(n-2)+4*(2*n^2-4*n+1)*a(n-1))/(2*n-3))
        end:
    seq(a(n), n=0..18);

Formula

a(n) = A152874(2n,n).
From Vaclav Kotesovec, May 26 2023: (Start)
Recurrence: (2*n - 3)*a(n) = 4*(2*n^2 - 4*n + 1)*a(n-1) + 16*(n-2)^2*(n-1)^2*(2*n - 1)*a(n-2).
a(n) ~ 2^(2*n+1) * n^(2*n) / exp(2*n). (End)
Showing 1-3 of 3 results.