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.

A242027 Number T(n,k) of endofunctions on [n] with cycles of k distinct lengths; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 4, 0, 24, 3, 0, 206, 50, 0, 2300, 825, 0, 31742, 14794, 120, 0, 522466, 294987, 6090, 0, 9996478, 6547946, 232792, 0, 218088504, 160994565, 8337420, 0, 5344652492, 4355845868, 299350440, 151200, 0, 145386399554, 128831993037, 11074483860, 18794160
Offset: 0

Views

Author

Alois P. Heinz, Aug 11 2014

Keywords

Examples

			T(3,2) = 3: (1,3,2), (3,2,1), (2,1,3).
Triangle T(n,k) begins:
00 :  1;
01 :  0,          1;
02 :  0,          4;
03 :  0,         24,          3;
04 :  0,        206,         50;
05 :  0,       2300,        825;
06 :  0,      31742,      14794,       120;
07 :  0,     522466,     294987,      6090;
08 :  0,    9996478,    6547946,    232792;
09 :  0,  218088504,  160994565,   8337420;
10 :  0, 5344652492, 4355845868, 299350440, 151200;
		

Crossrefs

Row sums give A000312.
T(A000217(n),n) gives A246292.
Cf. A003056, A060281, A218868 (the same for permutations).

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(i<1 or k<1, 0, add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i-1, k-`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    T:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j$2, k), j=0..n):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..14);
  • Mathematica
    multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k==0, 1, 0], If[i<1 || k<1, 0, Sum[(i-1)!^j*multinomial[n, Join[ {n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1, k-If[j==0, 0, 1]], {j, 0, n/i}]] ]; T[0, 0] = 1; T[n_, k_] := Sum[Binomial[n-1, j-1]*n^(n-j)*b[j, j, k], {j, 0, n}]; Table[T[n, k], {n, 0, 14}, {k, 0, Floor[(Sqrt[1+8n]-1)/2]}] // Flatten (* Jean-François Alcover, Feb 18 2017, translated from Maple *)

A243098 Number T(n,k) of endofunctions on [n] with all cycles of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 16, 6, 2, 0, 125, 51, 24, 6, 0, 1296, 560, 300, 120, 24, 0, 16807, 7575, 4360, 2160, 720, 120, 0, 262144, 122052, 73710, 41160, 17640, 5040, 720, 0, 4782969, 2285353, 1430016, 861420, 430080, 161280, 40320, 5040
Offset: 0

Views

Author

Alois P. Heinz, Aug 18 2014

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			Triangle T(n,k) begins:
  1;
  0,      1;
  0,      3,      1;
  0,     16,      6,     2;
  0,    125,     51,    24,     6;
  0,   1296,    560,   300,   120,    24;
  0,  16807,   7575,  4360,  2160,   720,  120;
  0, 262144, 122052, 73710, 41160, 17640, 5040, 720;
  ...
		

Crossrefs

Columns k=0-4 give: A000007, A000272(n+1) for n>0, A057817(n+1), 2*A060917, 6*A060918.
Row sums give A241980.
T(2n,n) gives A246050.
Main diagonal gives A000142(n-1) for n>0.

Programs

  • Maple
    with(combinat):
    T:= (n, k)-> `if`(k*n=0, `if`(k+n=0, 1, 0),
        add(binomial(n-1, j*k-1)*n^(n-j*k)*(k-1)!^j*
        multinomial(j*k, k$j, 0)/j!, j=0..n/k)):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    multinomial[n_, k_] := n!/Times @@ (k!); T[n_, k_] := If[k*n==0, If[k+n == 0, 1, 0], Sum[Binomial[n-1, j*k-1]*n^(n-j*k)*(k-1)!^j*multinomial[j*k, Append[Array[k&, j], 0]]/j!, {j, 0, n/k}]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2017, translated from Maple *)

Formula

E.g.f. of column k>0: exp((-LambertW(-x))^k/k), e.g.f. of column k=0: 1.

A212789 Number of endofunctions on [n] with distinct cycle lengths.

Original entry on oeis.org

1, 1, 3, 20, 186, 2229, 32790, 572018, 11541600, 264370473, 6776462320, 192163455384, 5972728750560, 201906797867085, 7375152706023648, 289473254317393110, 12149690892777901568, 543010240381452000273, 25746662043469525754880, 1290829803802550504743036
Offset: 0

Views

Author

Geoffrey Critzer, May 27 2012

Keywords

Examples

			a(3)=20 because there are 27 functions f:{1,2,3}->{1,2,3} but 7 of these have at least two cycles of equal length: (1,2,3);(1,2,1);(1,2,2);(1,1,3);(1,3,3);(2,2,3)(3,2,3) where the functions are represented by their values.
		

Crossrefs

Cf. A241980.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i-1), j=0..min(1, n/i))))
        end:
    a:= n-> add(binomial(n-1, j-1)*n^(n-j)*b(j$2), j=0..n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Aug 10 2014
  • Mathematica
    nn = 20; p = Product[1 + t^n/n, {n, 1, nn}]; t = Sum[n^(n - 1) x^n/n!, {n, 1, nn}]; Range[0, nn]! CoefficientList[Series[p, {x, 0, nn}], x]

Formula

E.g.f.: A(T(x)) where A(x) is e.g.f. for A007838 and T(x) is e.g.f. for A000169.

Extensions

Terms a(8)-a(19) recomputed by Alois P. Heinz, Aug 10 2014
Showing 1-3 of 3 results.