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.

A335109 Triangle read by rows: T(n,k) is the number of permutations of length n with each cycle of the permutation containing only elements that are identical (mod k), where 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 6, 2, 1, 24, 4, 2, 1, 120, 12, 4, 2, 1, 720, 36, 8, 4, 2, 1, 5040, 144, 24, 8, 4, 2, 1, 40320, 576, 72, 16, 8, 4, 2, 1, 362880, 2880, 216, 48, 16, 8, 4, 2, 1, 3628800, 14400, 864, 144, 32, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Dennis P. Walsh, May 23 2020

Keywords

Comments

Let [n] denote {1,2,...,n} and let [n](j,k) denote the subset of [n] consisting of all elements of [n] that equal j mod k. The cardinality of [n](j,k) equals ceiling(n/k) for j = 1..(n mod k) and equals floor(n/k) for j > (n mod k). Therefore, upon permuting the elements of each [n](j,k) subset, we obtain T(n,k) = (ceiling(n/k)!)^(n mod k)*(floor(n/k)!)^(k-(n mod k)).

Examples

			Triangle begins:
    1;
    2  1;
    6  2 1;
   24  4 2 1;
  120 12 4 2 1;
  ...
T(6,3) counts the 8 permutations of [6] where all cycle-mates are identical mod 3, namely, (1 4)(2 5)(3 6), (1 4)(2 5)(3)(6), (1 4)(2)(5)(3 6), (1)(4)(2 5)(3 6), (1 4)(2)(5)(3)(6), (1)(4)(2 5)(3)(6), (1)(4)(2)(5)(3 6) and (1)(2)(3)(4)(5)(6).
		

Crossrefs

Programs

  • Maple
    seq(seq((ceil(n/k)!)^(n mod k)*(floor(n/k)!)^(k-(n mod k)), k=1..n), n=1..10);
  • Mathematica
    Table[(Ceiling[n/k]!)^Mod[n, k]*(Floor[n/k]!)^(k - Mod[n, k]), {n, 10}, {k, n}] // Flatten (* Michael De Vlieger, Jun 28 2020 *)

Formula

T(n,k) = (ceiling(n/k)!)^(n mod k)*(floor(n/k)!)^(k-(n mod k)) for 1 <= k <= n.
T(n,1) = A000142(n).
T(n,2) = A010551(n) for n > 1.
T(n,3) = A264557(n) for n > 2.
T(n,4) = A264635(n) for n > 3.
T(n,5) = A264656(n) for n > 4.
T(n,k) = Product_{i=0..k-1} floor((n+i)/k)!. - Alois P. Heinz, May 23 2020