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.

A261431 Number of permutations p of [n] without fixed points such that p^n = Id.

Original entry on oeis.org

1, 0, 1, 2, 9, 24, 175, 720, 7665, 42560, 436401, 3628800, 70215145, 479001600, 7116730335, 88966701824, 1653438211425, 20922789888000, 457688776369825, 6402373705728000, 145083396337080201, 2457732174030848000, 55735573291977790575, 1124000727777607680000
Offset: 0

Views

Author

Alois P. Heinz, Aug 18 2015

Keywords

Crossrefs

Main diagonal of A261430.
Cf. A074759.

Programs

  • Maple
    with(numtheory):
    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=divisors(k) minus {1})))
        end:
    a:= n-> A(n$2):
    seq(a(n), n=0..25);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n < 0, 0, If[n == 0, 1, Sum[Product[n - i, {i, 1, j - 1}] A[n - j, k], {j, Divisors[k] ~Complement~ {1}}]]];
    a[n_] := A[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 23 2017, translated from Maple *)

Formula

a(n) = n! * [x^n] exp(Sum_{d|n, d>1} x^d/d).