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.

A346121 Number of permutations of [n] whose order is a multiple of n.

Original entry on oeis.org

1, 1, 2, 6, 24, 240, 720, 5040, 40320, 816480, 3628800, 108108000, 479001600, 14789174400, 254431457280, 1307674368000, 20922789888000, 872545722048000, 6402373705728000, 411616608508385280, 7817896752906240000, 128126503414990080000, 1124000727777607680000
Offset: 1

Views

Author

Alois P. Heinz, Jul 05 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, g) option remember; `if`(n=0, x^g, add((j-1)!
          *b(n-j, ilcm(g, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> (p-> add(coeff(p, x, i*n), i=1..degree(p)/n))(b(n, 1)):
    seq(a(n), n=1..23);
    # second Maple program:
    h:= proc(n, j) option remember; uses padic, numtheory; n/mul(`if`(
          ordp(j, p) b(n$2):
    seq(a(n), n=1..23);
  • Mathematica
    b[n_, g_] := b[n, g] = If[n == 0, x^g, Sum[(j - 1)!*b[n - j, LCM[g, j]]* Binomial[n - 1, j - 1], {j, 1, n}]] // Expand;
    a[n_] := With[{p = b[n, 1]}, Sum[Coefficient[p, x, i*n], {i, 1, Exponent[p, x]/n}]];
    Array[a, 40] (* Jean-François Alcover, Aug 23 2021, after Alois P. Heinz's first program *)

Formula

a(n) = Sum_{i>=1} A057731(n,i*n).
a(n) = (n-1)! <=> n in { A000961 }.
a(n) = A057731(n,n) = A074351(n) = A052699(n-1) for n <= 9.