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

A023998 Number of block permutations on an n-set which are uniform, i.e., corresponding blocks have same size.

Original entry on oeis.org

1, 1, 3, 16, 131, 1496, 22482, 426833, 9934563, 277006192, 9085194458, 345322038293, 15024619744202, 740552967629021, 40984758230303149, 2527342803112928081, 172490568947825135203, 12952575262915522547136, 1064521056888312620947794, 95305764621957309071404877
Offset: 0

Views

Author

Des FitzGerald (D.FitzGerald(AT)utas.edu.au)

Keywords

Comments

Number of games of simple patience with n cards. Take a shuffled deck of n cards labeled 1..n; as each card is dealt it is placed either on a higher-numbered card or starts a new pile to the right. Cards are not moved once they are placed. Suggested by reading Aldous and Diaconis. - N. J. A. Sloane, Dec 19 1999
Number of set partitions of [2n] such that within each block the numbers of odd and even elements are equal. a(2) = 3: 1234, 12|34, 14|23; a(3) = 16: 123456, 1234|56, 1236|45, 1245|36, 1256|34, 12|3456, 12|34|56, 12|36|45, 1346|25, 1456|23, 14|2356, 14|23|56, 16|2345, 16|23|45, 14|25|36, 16|25|34. - Alois P. Heinz, Jul 14 2016

Examples

			For n=3 there are 25 block permutations, of which 9 of the form ({1} maps to {1,2}; {2,3} maps to {3}), are not uniform. Hence a(3) = 25 - 9 = 16.
Alternatively, for n=3 the 6 permutations of 3 cards produce 16 games, as follows: 123 -> {1,2,3}; 132 -> {1,32}, {1,3,2}; 213 -> {21,3}, {2,1,3}; 231 -> {21,3}, {2,31}, {2,3,1}; 312 -> {31,2}, {32,1}, {3,1,2}; 321 -> {321}, {32,1}, {31,2}, {3,21}, {3,2,1}.
G.f.: A(x) = 1 + x + 3*x^2/2!^2 + 16*x^3/3!^2 + 131*x^4/4!^2 + 1496*x^5/5!^2 + ...
log(A(x)) = x + x^2/2!^2 + x^3/3!^2 + x^4/4!^2 + x^5/5!^2 + ...
		

Crossrefs

Cf. A132813.
Column k=2 of A275043.
Main diagonal of A321296 and of A322670.

Programs

  • Haskell
    a023998 n = a023998_list !! n
    a023998_list = 1 : f 2 [1] a132813_tabl where
       f x ys (zs:zss) = y : f (x + 1) (ys ++ [y]) zss where
                         y = sum $ zipWith (*) ys zs
    -- Reinhard Zumkeller, Apr 04 2014
  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-i)*binomial(n-1, i-1)/i!, i=1..n))
        end:
    a:= n-> b(n)*n!:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 11 2016
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k] Binomial[n-1, k] a[k], {k, 0, n-1}];
    Array[a, 25, 0] (* Jean-François Alcover, Jul 28 2016 *)
    nmax = 20; CoefficientList[Series[E^(-1 + BesselI[0, 2*Sqrt[x]]), {x, 0, nmax}], x]*Range[0, nmax]!^2 (* Vaclav Kotesovec, Jun 09 2019 *)
  • PARI
    a(n)=if(n==0,1,sum(k=0,n-1,binomial(n,k)*binomial(n-1,k)*a(k))) \\ Paul D. Hanna, Aug 15 2007
    
  • PARI
    {a(n)=n!^2*polcoeff(exp(sum(m=1, n, x^m/m!^2)+x*O(x^n)), n)} /* Paul D. Hanna */
    
  • PARI
    N=66; x='x+O('x^N); /* that many terms */
    Vec(serlaplace(serlaplace(exp(sum(n=1, N, x^n/n!^2))))) /* show terms */
    /* Joerg Arndt, Jul 12 2011 */
    
  • PARI
    v=vector(N); v[1]=1;
    for (n=1,N-1, v[n+1]=sum(k=0,n-1, binomial(n,k)*binomial(n-1,k)*v[k+1]) );
    v /* show terms */
    /* Joerg Arndt, Jul 12 2011 */
    

Formula

a(n) = Sum_{k=0..n-1} C(n,k)*C(n-1,k)*a(k) for n>0 with a(0)=1. - Paul D. Hanna, Aug 15 2007
G.f.: Sum_{n>=0} a(n)*x^n/n!^2 = exp( Sum_{n>=1} x^n/n!^2 ). [Paul D. Hanna, Jan 04 2011; merged from duplicate entry A179119]
Row sums of A061691.
Generating function: Let J(z) = Sum_{n>=0} z^n/n!^2. Then exp(J(z)-1) = Sum_{n>=0} a(n)*z^n/n!^2 = 1 + z + 3*z^2/2!^2 + 16*z^3/3!^2 + .... - Peter Bala, Jul 11 2011

Extensions

More terms from Vladeta Jovovic, Sep 03 2002

A192721 The number of pairs of permutations in the product group S_n X S_n with k common descents, n >= 1 and 0 <= k <= n-1.

Original entry on oeis.org

1, 3, 1, 19, 16, 1, 211, 299, 65, 1, 3651, 7346, 3156, 246, 1, 90921, 237517, 160322, 28722, 917, 1, 3081513, 9903776, 9302567, 2864912, 245407, 3424, 1, 136407699, 520507423, 632274183, 288196659, 46261609, 2041965, 12861, 1
Offset: 1

Views

Author

Peter Bala, Jul 11 2011

Keywords

Comments

Let S_n denote the symmetric group on {1,2,...,n}. A permutation p_1p_2...p_n in S_n has a descent at position i (1 <= i <= n-1) if p_i > p_(i+1). The Eulerian numbers A008292 (with an offset of 0 in the column indexing) enumerate permutations by descents. We define a pair of permutations p_1p_2...p_n and q_1q_2...q_n to have a common descent at position i (1 <= i <= n-1) if both p_i > p_(i+1) and q_i > q_(i+1). For example, the permutations (3241) and (4231) in S_4 have common descents at positions i = 1 and i = 3. The table entry T(n,k) gives the number of pairs of permutations in the Cartesian product S_n x S_n with k common descents.
The generalized Stirling numbers associated with this triangle is A061691. See also A192722.

Examples

			The triangle begins
n/k|.....0.......1.......2......3....4.....5
============================================
..1|.....1
..2|.....3.......1
..3|....19......16.......1
..4|...211.....299......65......1
..5|..3651....7346....3156....246....1
..6|.90921..237517..160322..28722..917.....1
..
Row 3 entries T(3,0) = 19, T(3,1) = 16 and T(3,2) = 1 can be read from the following table:
============================================
Number of common descents in S_3 x S_3
============================================
.
...|.123...132...213...231...312...321
======================================
123|..0.....0.....0.....0.....0.....0
132|..0.....1.....0.....1.....0.....1
213|..0.....0.....1.....0.....1.....1
231|..0.....1.....0.....1.....0.....1
312|..0.....0.....1.....0.....1.....1
321|..0.....1.....1.....1.....1.....2
Matrix identity A192721 * A007318 = row reverse of A192722:
/...1................\ /..1..............\
|...3.....1...........||..1....1..........|
|..19....16.....1.....||..1....2....1.....|
|.211...299....65....1||..1....3....3....1|
|.....................||..................|
=
/...1...................\
|...4......1.............|
|..36.....18......1......|
|.576....432.....68.....1|
|........................|
		

Crossrefs

Cf. A000275 (first column), A001044 (row sums), A008292, A008459, A061691, A192722.

Programs

  • Maple
    #A192721
    #J = sum {n>=0} z^n/n!^2
    J := unapply(BesselJ(0, 2*I*sqrt(z)),z):
    G := (1-x)/(-x + J(z*(x-1))):
    Gser := simplify(series(G, z = 0, 12)):
    for n from 1 to 10 do
    P[n] := n!^2*sort(coeff(Gser, z, n)) od:
    for n from 1 to 10 do seq(coeff(P[n],x,k), k = 0..n-1) od;
    # gives sequence in triangular form
  • Mathematica
    max = 9; j[z_] := BesselJ[0, 2 I*Sqrt[z]]; g = (1 - x)/(-x + j[z*(x - 1)]); gser = Series[g, {z, 0, max}]; p[n_] := n!^2 Coefficient[ gser, z, n]; a[n_, k_] := Coefficient[ p[n], x, k]; Flatten[ Table[ a[n, k], {n, 1, max-1}, {k, 0, n-1}]] (* Jean-François Alcover, Dec 13 2011, after Maple *)

Formula

Generating function (Carlitz et al. 1976): Let J(z) = sum {n>=0} z^n/n!^2. Then (1-x)/(J(z*(x-1))-x) = 1 + sum {n>=1} (sum {k = 0..n-1} T(n,k)*x^k)*z^n/n!^2 = 1 + z + (3+x)*z^2/2!^2 + (19+16*x+x^2)*z^3/3!^2 + .... Define a polynomial sequence {p(n,x) }n>=0 by means of the generating function J(z)^x = sum {n>=0} p(n,x)*z^n/n!^2. The generalized Eulerian polynomials associated with the sequence {p(n,x)} as defined by [Koutras, 1994] are the polynomials sum {k = 0..n-1} T(n,k)*x^(n-k).
Relations with other sequences: The first column of the array (x*I-A008459)^-1 (I the identity matrix) is a sequence of rational functions whose numerator polynomials are the row generating polynomials for the present triangle. The change of variable x -> (x+1)/x followed by z -> x*z transforms the above bivariate generating function (1-x)/(J(z*(x-1))-x) into 1/(1+x-x*J(z)), which is the generating function for A192722. Equivalently, if we postmultiply the present triangle by Pascal's triangle A007318 we obtain the row reversed form of A192722: A192721 * A007318 = row reverse of A192722.
Row n sum = n!^2 = A001044(n).
First column [1,3,19,211,3651,...] = A000275 (apart from initial term).

A061692 Triangle of generalized Stirling numbers.

Original entry on oeis.org

1, 1, 4, 1, 27, 36, 1, 172, 864, 576, 1, 1125, 17500, 36000, 14400, 1, 7591, 351000, 1746000, 1944000, 518400, 1, 52479, 7197169, 80262000, 191394000, 133358400, 25401600, 1, 369580, 151633440, 3691514176, 17188416000, 23866214400, 11379916800, 1625702400
Offset: 1

Views

Author

N. J. A. Sloane, Jun 19 2001

Keywords

Examples

			1; 1,4; 1,27,36; 1,172,864,576; ...
		

Crossrefs

Diagonals give A001044, A061695, A061693, A061694. Cf. A061691.
Row sums give A061684.

Programs

  • Maple
    b:= proc(n) option remember; expand(
          `if`(n=0, 1, add(x*b(n-i)/i!^3, i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)/i!, i=1..n))(b(n)*n!^3):
    seq(T(n), n=1..10);  # Alois P. Heinz, Sep 10 2019
  • Mathematica
    R[0, ] = 1; R[n, x_] := R[n, x] = x*Sum[Binomial[n, k]^2*Binomial[n-1, k]*R[k, x], {k, 0, n-1}]; Table[CoefficientList[R[n, x], x] // Rest, {n, 1, 8}] // Flatten (* Jean-François Alcover, Sep 01 2015, after Peter Bala *)

Formula

T(n, k) = 1/k!*Sum multinomial(n, n_1, n_2, ..n_k)^3, where the sum extends over all compositions (n_1, n_2, .., n_k) of n into exactly k nonnegative parts. - Vladeta Jovovic, Apr 23 2003
The row polynomials R(n,x) satisfy the recurrence equation R(n,x) = x*( sum {k = 0..n-1} binomial(n,k)^2*binomial(n-1,k)*R(k,x) ) with R(0,x) = 1. Also R(n,x + y) = sum {k = 0..n} binomial(n,k)^3*R(k,x)*R(n-k,y). - Peter Bala, Sep 17 2013

Extensions

More terms from Vladeta Jovovic, Apr 23 2003

A192722 T(n,k) = Sum of multinomial(n; n_1,n_2,...,n_k)^2, where the sum extends over all compositions (n_1,n_2,...,n_k) of n into exactly k nonnegative parts.

Original entry on oeis.org

1, 1, 4, 1, 18, 36, 1, 68, 432, 576, 1, 250, 3900, 14400, 14400, 1, 922, 32400, 252000, 648000, 518400, 1, 3430, 262542, 3880800, 19404000, 38102400, 25401600, 1, 12868, 2119152, 56664384, 493920000, 1795046400, 2844979200, 1625702400
Offset: 1

Views

Author

Peter Bala, Jul 11 2011

Keywords

Comments

Compare with triangle A019538, whose entries are given by
... Sum multinomial(n; n_1,n_2,...,n_k), where the sum extends over all compositions (n_1,n_2,...,n_k) of n into exactly k nonnegative parts.
For related tables see A061691 and A192721.
Let P be the poset of all ordered pairs (S,T) of subsets of [n] with |S|=|T|, ordered componentwise by inclusion. T(n,k) is the number of length k chains in P from ({},{}) to ([n],[n]). - Geoffrey Critzer, Apr 15 2020

Examples

			The triangle begins
n/k|..1.....2.......3........4........5........6
================================================
.1.|..1
.2.|..1.....4
.3.|..1....18.....36
.4.|..1....68.....432......576
.5.|..1...250....3900....14400....14400
.6.|..1...922...32400...252000...648000...518400
...
T(4,2) = 68:
There are 3 compositions of 4 into 2 parts, namely, 4 = 2 + 2 = 1 + 3 = 3 + 1; hence
T(4,2) = (4!/(2!*2!))^2 + (4!/(1!*3!))^2 + (4!/(3!*1!))^2
= 36 + 16 + 16 = 68.
Matrix identity: A192721 * Pascal's triangle = row reverse of A192722:
/...1................\ /..1..............\
|...3.....1...........||..1....1..........|
|..19....16.....5.....||..1....2....1.....|
|.211...299....65....1||..1....3....3....1|
|.....................||..................|
=
/...1...................\
|...4......1.............|
|..36.....18......1......|
|.576....432.....68.....1|
|........................|
		

Crossrefs

Cf. A001044, A002190, A061691, A192721, A102221 (row sums), A000275 (alternating row sums).

Programs

  • Maple
    J := unapply(BesselJ(0, 2*sqrt(-1)*sqrt(z)), z):
    G := 1/(1-x*(J(z)-1)):
    Gser := simplify(series(G, z = 0, 15)):
    for n from 1 to 14 do
    P[n] := n!^2*sort(coeff(Gser, z, n)) od:
    for n from 1 to 14 do seq(coeff(P[n], x, k), k = 1..n) od;
    # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(
          `if`(n=0, 1, add(x*b(n-i)/i!^2, i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n)*n!^2):
    seq(T(n), n=1..14);  # Alois P. Heinz, Sep 10 2019
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[x b[n-i]/i!^2, {i, 1, n}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n] n!^2];
    Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Dec 07 2019, after Alois P. Heinz *)

Formula

Generating function: Let J(z) = Sum_{n>=0} z^n/n!^2. Then
1 + Sum_{n>=1} (Sum_{k = 1..n} T(n,k)*x^k)*z^n/n!^2 = 1/(1 - x*(J(z) - 1))
= 1 + x*z + (x + 4*x^2)*z^2/2!^2 + (x + 18*x^2 + 36*x^3)*z^3/3!^2 + ....
Relations with other sequences:
The change of variable z -> z/x followed by x -> 1/(x - 1) transforms the above bivariate generating function 1/(1 - x*(J(z) - 1)) into (1 - x)/(-x + J(z*(x-1))), which is the generating function for A192721.
1/k!*T(n,k) = A061691(n,k).
T(n,n) = n!^2 = A001044(n).
Row sums = A102221.
For n>=1, Sum_{k = 1..n} (-1)^(n+k)*T(n,k)/k = A002190(n).

A343254 Triangle read by rows: T(n,k) is the number of 2-balanced partitions of a set of n elements in which the first and the second subsets have cardinality k, for n >= 0, k = 0..floor(n/2).

Original entry on oeis.org

1, 1, 2, 1, 5, 2, 15, 5, 3, 52, 15, 8, 203, 52, 25, 16, 877, 203, 89, 53, 4140, 877, 354, 197, 131, 21147, 4140, 1551, 810, 512, 115975, 21147, 7403, 3643, 2193, 1496, 678570, 115975, 38154, 17759, 10201, 6697, 4213597, 678570, 210803, 93130, 51146, 32345, 22482
Offset: 0

Views

Author

Francesca Aicardi, Jun 04 2021

Keywords

Comments

A 2-balanced partition is a partition of a set which is the union of three subsets, with the property that the cardinality of the first two subsets are equal (possibly zero), and each block contains the same number (possibly zero) of elements from the first and from the second subset. The rows add to A344775.
T(n,0) are the Bell numbers. T(2k,k) are the numbers of 2-balanced partitions in the particular case in which the third set is empty. T(2k,k) are the generalized Bell numbers given in A023998.

Examples

			T(4,1) = 5, number of 2-balanced partitions of a set A of 4 elements with 1 element in the first subset and 1 element in the second subset: A={a} U {b} U {c,d}. The five partitions are: ((a,b),(c),(d)), ((a,b),(c,d)), ((a,b,c),(d)), ((a,b,d),(c)), ((a,b,c,d)). Note that if a block contains a, then it must contain b. Thus, T(n,1) = T(n-1,0).
Triangle T(n,k) begins:
        1;
        1;
        2,      1;
        5,      2;
       15,      5,      3;
       52,     15,      8;
      203,     52,     25,    16;
      877,    203,     89,    53;
     4140,    877,    354,   197,   131;
    21147,   4140,   1551,   810,   512;
   115975,  21147,   7403,  3643,  2193,  1496;
   678570, 115975,  38154, 17759, 10201,  6697;
  4213597, 678570, 210803, 93130, 51146, 32345, 22482;
  ...
		

Crossrefs

Cf. A000110 (Bell numbers), A023998, A061691 (generalized Stirling numbers), A344775 (row sums).

Formula

T(n,k) = Sum_{j=1..n-k} C(n,k,j). C(n,k,j) is defined for n>=2k, j<=n-k, and obtained by the recursion: C(n,k,j) = C(n-1,k,j-1) + j*C(n-1,k,j), with initial conditions C(2k,k,j) = triangle A061691(k,j) of generalized Stirling numbers.

A061689 Generalized Stirling numbers.

Original entry on oeis.org

1, 34, 650, 10500, 161700, 2493120, 39372480, 644112000, 10977120000, 195392736000, 3636061228800, 70737918451200, 1437896940480000, 30512401920000000, 675213301002240000, 15564170478624768000, 373267990604500992000, 9302809053765427200000
Offset: 1

Views

Author

N. J. A. Sloane, Jun 18 2001

Keywords

Crossrefs

Second subdiagonal of A061691.

Extensions

More terms from Sean A. Irvine, Feb 27 2023

A061690 Generalized Stirling numbers.

Original entry on oeis.org

0, 0, 6, 72, 650, 5400, 43757, 353192, 2862330, 23352300, 191891117, 1587587760, 13215894133, 110619113423, 930376519256, 7858437064232, 66627124896218, 566791391339532, 4836144006188165, 41375938305568772, 354859541163656045
Offset: 1

Views

Author

N. J. A. Sloane, Jun 18 2001

Keywords

Crossrefs

Third column of A061691.

Programs

  • PARI
    a(n) = {n!^2*polcoef((besseli(0, 2*x + O(x^(2*n+1))) - 1)^3, 2*n)/6} \\ Andrew Howroyd, Mar 04 2021

Formula

a(n) = s(n, k) = Sum_{pi} n!/(k(1)! * 1!^k(1) * k(2)! * 2!^k(2) * ... * k(n)! * n!^k(n)) * (n!/(1!^k(1) * 2!^k(2) * ... * n!^k(n)))^L, where pi runs through all partitions k(1) +2 * k(2)+...+n * k(n) = n such that k = k(1)+k(2)+...+k(n), with k = 3 and L = 1.
Sum_{n>=1} a(n) * x^n / (n!)^2 = (BesselI(0,2*sqrt(x)) - 1)^3 / 6. - Ilya Gutkovskiy, Mar 04 2021

Extensions

Formula and more terms from Vladeta Jovovic, Dec 09 2001
Showing 1-7 of 7 results.