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-5 of 5 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

A322670 Number T(n,k) of colored set partitions of [n] where colors of the elements of subsets are distinct and in increasing order and exactly k colors are used; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 1, 12, 16, 0, 1, 41, 156, 131, 0, 1, 140, 1155, 2460, 1496, 0, 1, 497, 8020, 32600, 47355, 22482, 0, 1, 1848, 55629, 385420, 1004360, 1098678, 426833, 0, 1, 7191, 394884, 4396189, 18304510, 34625304, 30259712, 9934563
Offset: 0

Views

Author

Alois P. Heinz, Aug 29 2019

Keywords

Examples

			T(3,2) = 12: 1a|2a3b, 1b|2a3b, 1a3b|2a, 1a3b|2b, 1a2b|3a, 1a2b|3b, 1a|2a|3b, 1a|2b|3a, 1b|2a|3a, 1a|2b|3b, 1b|2a|3b, 1b|2b|3a.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,    3;
  0, 1,   12,    16;
  0, 1,   41,   156,    131;
  0, 1,  140,  1155,   2460,    1496;
  0, 1,  497,  8020,  32600,   47355,   22482;
  0, 1, 1848, 55629, 385420, 1004360, 1098678, 426833;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A325482.
Main diagonal gives A023998.
Row sums give A325478.
T(2n,n) gives A325481.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(A(n-j, k)*
          binomial(n-1, j-1)*binomial(k, j), j=1..min(k, n)))
        end:
    T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[A[n-j, k] Binomial[n-1, j-1]* Binomial[k, j], {j, 1, Min[k, n]}]];
    T[n_, k_] := Sum[A[n, k-i] (-1)^i Binomial[k, i], {i, 0, k}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 30 2020, after Alois P. Heinz *)

Formula

Sum_{k=1..n} k * T(n,k) = A325930(n).

A325888 Number of colored set partitions of [n] where colors of the elements of subsets are in (weakly) increasing order and all colors of an initial interval of the color palette are used.

Original entry on oeis.org

1, 1, 5, 41, 505, 8597, 191457, 5364837, 183744421, 7521913845, 361544182917, 20109571623693, 1278810836639233, 92032189911692253, 7430335604308535497, 667922294225164998677, 66407623510409091454229, 7260203111052685954056549, 868289612454444952122790277
Offset: 0

Views

Author

Alois P. Heinz, Sep 07 2019

Keywords

Crossrefs

Row sums of A321296.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(b(n-j, k)*
          binomial(n-1, j-1)*binomial(k+j-1, j), j=1..n))
        end:
    a:= n-> add(add(b(n, k-i)*(-1)^i*binomial(k, i), i=0..k), k=0..n):
    seq(a(n), n=0..21);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - j, k] Binomial[n - 1, j - 1] Binomial[k + j - 1, j], {j, 1, n}]];
    a[n_] := Sum[Sum[b[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}], {k, 0, n}];
    a /@ Range[0, 21] (* Jean-François Alcover, Dec 15 2020, after Alois P. Heinz *)

A325889 Number of colored set partitions of [2n] where colors of the elements of subsets are in (weakly) increasing order and exactly n colors are used.

Original entry on oeis.org

1, 2, 122, 30470, 19946654, 27291293442, 67940872709600, 280154891124993313, 1787697422835498425966, 16765591042116935170071062, 221912878453525607344964295822, 4012317533096874589918210188528948, 96463460015261984561875523126569759208
Offset: 0

Views

Author

Alois P. Heinz, Sep 07 2019

Keywords

Crossrefs

Cf. A321296.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(b(n-j, k)*
          binomial(n-1, j-1)*binomial(k+j-1, j), j=1..n))
        end:
    a:= n-> add(b(2*n, n-i)*(-1)^i*binomial(n, i), i=0..n):
    seq(a(n), n=0..15);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - j, k] Binomial[n - 1, j - 1] Binomial[k + j - 1, j], {j, 1, n}]];
    a[n_] := Sum[b[2n, n - i] (-1)^i Binomial[n, i], {i, 0, n}];
    a /@ Range[0, 15] (* Jean-François Alcover, Dec 15 2020, after Alois P. Heinz *)

Formula

a(n) = A321296(2n,n).

A325890 Number of colored set partitions of [n] where colors of the elements of subsets are in (weakly) increasing order and exactly two colors are used.

Original entry on oeis.org

3, 20, 122, 774, 5247, 38198, 298139, 2485690, 22045130, 207125874, 2053771931, 21416863948, 234145149539, 2676207794512, 31898152797430, 395584489687982, 5093960430643323, 67985187315217290, 938835976835478467, 13394336734762313862, 197153821757472332126
Offset: 2

Views

Author

Alois P. Heinz, Sep 07 2019

Keywords

Crossrefs

Column k=2 of A321296.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, add(b(n-j, k)*
          binomial(n-1, j-1)*binomial(k+j-1, j), j=1..n))
        end:
    a:= n-> (k-> add(b(n, k-i)*(-1)^i*binomial(k, i), i=0..k))(2):
    seq(a(n), n=2..25);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - j, k] Binomial[n - 1, j - 1] Binomial[k + j - 1, j], {j, 1, n}]];
    a[n_] := With[{k = 2}, Sum[b[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}]];
    a /@ Range[2, 25] (* Jean-François Alcover, Dec 15 2020, after Alois P. Heinz *)
Showing 1-5 of 5 results.