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.

A126074 Triangle read by rows: T(n,k) is the number of permutations of n elements that have the longest cycle length k.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 9, 8, 6, 1, 25, 40, 30, 24, 1, 75, 200, 180, 144, 120, 1, 231, 980, 1260, 1008, 840, 720, 1, 763, 5152, 8820, 8064, 6720, 5760, 5040, 1, 2619, 28448, 61236, 72576, 60480, 51840, 45360, 40320, 1, 9495, 162080, 461160, 653184, 604800, 518400, 453600, 403200, 362880
Offset: 1

Views

Author

Dan Dima, Mar 01 2007

Keywords

Comments

Sum of the n-th row is the number of all permutations of n elements: Sum_{k=1..n, T(n,k)} = n! = A000142(n) We can extend T(n,k)=0, if k<=0 or k>n.
From Peter Luschny, Mar 07 2009: (Start)
Partition product of prod_{j=0..n-2}(k-n+j+2) and n! at k = -1, summed over parts with equal biggest part (see the Luschny link).
Underlying partition triangle is A102189.
Same partition product with length statistic is A008275.
Diagonal a(A000217(n)) = rising_factorial(1,n-1), A000142(n-1) (n > 0).
Row sum is A000142. (End)
Let k in {1,2,3,...} index the family of sequences A000012, A000085, A057693, A070945, A070946, A070947, ... respectively. Column k is the k-th sequence minus its immediate predecessor. For example, T(5,3)=A057693(5)-A000085(5). - Geoffrey Critzer, May 23 2009

Examples

			Triangle T(n,k) begins:
  1;
  1,   1;
  1,   3,    2;
  1,   9,    8,    6;
  1,  25,   40,   30,   24;
  1,  75,  200,  180,  144,  120;
  1, 231,  980, 1260, 1008,  840,  720;
  1, 763, 5152, 8820, 8064, 6720, 5760, 5040;
  ...
		

Crossrefs

Cf. A000142.
T(2n,n) gives A052145 (for n>0). - Alois P. Heinz, Apr 21 2017

Programs

  • Maple
    A:= proc(n,k) option remember; `if`(n<0, 0, `if`(n=0, 1,
           add(mul(n-i, i=1..j-1)*A(n-j,k), j=1..k)))
        end:
    T:= (n, k)-> A(n, k) -A(n, k-1):
    seq(seq(T(n,k), k=1..n), n=1..10);  # Alois P. Heinz, Feb 11 2013
  • Mathematica
    Table[CoefficientList[ Series[(Exp[x^m/m] - 1) Exp[Sum[x^k/k, {k, 1, m - 1}]], {x, 0, 8}], x]*Table[n!, {n, 0, 8}], {m, 1, 8}] // Transpose // Grid (* Geoffrey Critzer, May 23 2009 *)
  • Sage
    def A126074(n, k):
        f = factorial(n)
        P = Partitions(n, max_part=k, inner=[k])
        return sum(f // p.aut() for p in P)
    for n in (1..9): print([A126074(n,k) for k in (1..n)]) # Peter Luschny, Apr 17 2016

Formula

T(n,1) = 1.
T(n,2) = n! * Sum_{k=1..[n/2]} 1/(k! * (2!)^k * (n-2*k)!).
T(n,k) = n!/k * (1-1/(n-k)-...-1/(k+1)-1/2k), if n/3 < k <= n/2.
T(n,k) = n!/k, if n/2 < k <= n.
T(n,n) = (n-1)! = A000142(n-1).
E.g.f. for k-th column: exp(-x^k*LerchPhi(x,1,k))*(exp(x^k/k)-1)/(1-x). - Vladeta Jovovic, Mar 03 2007
From Peter Luschny, Mar 07 2009: (Start)
T(n,0) = [n = 0] (Iverson notation) and for n > 0 and 1 <= m <= n
T(n,m) = Sum_{a} M(a)|f^a| where a = a_1,..,a_n such that
1*a_1+2*a_2+...+n*a_n = n and max{a_i} = m, M(a) = n!/(a_1!*..*a_n!),
f^a = (f_1/1!)^a_1*..*(f_n/n!)^a_n and f_n = product_{j=0..n-2}(j-n+1). (End)
Sum_{k=1..n} k * T(n,k) = A028418(n). - Alois P. Heinz, May 17 2016

A293211 Triangle T(n,k) is the number of permutations on n elements with at least one k-cycle for 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 4, 3, 2, 15, 9, 8, 6, 76, 45, 40, 30, 24, 455, 285, 200, 180, 144, 120, 3186, 1995, 1400, 1260, 1008, 840, 720, 25487, 15855, 11200, 8820, 8064, 6720, 5760, 5040, 229384, 142695, 103040, 79380, 72576, 60480, 51840, 45360, 40320, 2293839, 1427895, 1030400, 793800, 653184, 604800, 518400, 453600, 403200, 362880
Offset: 1

Views

Author

Dennis P. Walsh, Oct 02 2017

Keywords

Comments

T(n,k) is equivalent to n! minus the number of permutations on n elements with zero k-cycles (sequence A122974).

Examples

			T(n,k) (the first 8 rows):
:     1;
:     1,     1;
:     4,     3,     2;
:    15,     9,     8,    6;
:    76,    45,    40,   30,   24;
:   455,   285,   200,  180,  144,  120;
:  3186,  1995,  1400, 1260, 1008,  840,  720;
: 25487, 15855, 11200, 8820, 8064, 6720, 5760, 5040;
  ...
T(4,3)=8 since there are exactly 8 permutations on {1,2,3,4} with at least one 3-cycle: (1)(234), (1)(243), (2)(134), (2)(143), (3)(124), (3)(142), (4)(123), and (4)(132).
		

Crossrefs

Row sums give A132961.
T(n,n) gives A000142(n-1) for n>0.
T(2n,n) gives A052145.

Programs

  • Maple
    T:=(n,k)->n!*sum((-1)^(j+1)*(1/k)^j/j!,j=1..floor(n/k)); seq(seq(T(n,k),k=1..n),n=1..10);
  • Mathematica
    Table[n!*Sum[(-1)^(j + 1)*(1/k)^j/j!, {j, Floor[n/k]}], {n, 10}, {k, n}] // Flatten (* Michael De Vlieger, Oct 02 2017 *)

Formula

T(n,k) = n! * Sum_{j=1..floor(n/k)} (-1)^(j+1)*(1/k)^j/j!.
T(n,k) = n! - A122974(n,k).
E.g.f. of column k: (1-exp(-x^k/k))/(1-x). - Alois P. Heinz, Oct 11 2017

A256880 n*n!/round(n/2).

Original entry on oeis.org

1, 4, 9, 48, 200, 1440, 8820, 80640, 653184, 7257600, 73180800, 958003200, 11564467200, 174356582400, 2451889440000, 41845579776000, 671854030848000, 12804747411456000, 231125690776780800, 4865804016353280000
Offset: 1

Views

Author

M. F. Hasler, Apr 21 2015

Keywords

Crossrefs

Programs

Formula

a(2n-1) = A052145(n).
a(2n) = 4*A002674(n) = 2*A010050(n) = 2^(n+1)*A000680(n), n>=1.
Showing 1-3 of 3 results.