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.

A352012 a(n) = Sum_{p|n, p prime} (n-1)!/(p-1)!.

Original entry on oeis.org

0, 1, 1, 6, 1, 180, 1, 5040, 20160, 378000, 1, 59875200, 1, 6235669440, 47221574400, 1307674368000, 1, 533531142144000, 1, 126713646259200000, 1219830034655232000, 51090956251003468800, 1, 38778025108327464960000, 25852016738884976640000
Offset: 1

Views

Author

Seiichi Manyama, Feb 28 2022

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
      add( (n-1)!/(p-1)!, p = numtheory:-factorset(n))
    end proc:
    map(f, [$1..30]): # Robert Israel, Nov 14 2024
  • Mathematica
    a[1] = 0; a[n_] := (n - 1)! * Plus @@ (1/(FactorInteger[n][[;; , 1]] - 1)!); Array[a, 25] (* Amiram Eldar, Mar 01 2022 *)
  • PARI
    a(n) = sumdiv(n, d, isprime(d)*(n-1)!/(d-1)!);
    
  • PARI
    my(N=40, x='x+O('x^N)); concat(0, Vec(serlaplace(-sum(k=1, N, isprime(k)*log(1-x^k)/k!))))
    
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, (n-1)!/(f[k,1]-1)!); \\ Michel Marcus, Mar 01 2022

Formula

E.g.f.: -Sum_{p prime} log(1-x^p)/p!.
a(n) = 1 if and only if n is prime.