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)!.

This page as a plain text file.
%I A352012 #27 Nov 14 2024 02:10:58
%S A352012 0,1,1,6,1,180,1,5040,20160,378000,1,59875200,1,6235669440,
%T A352012 47221574400,1307674368000,1,533531142144000,1,126713646259200000,
%U A352012 1219830034655232000,51090956251003468800,1,38778025108327464960000,25852016738884976640000
%N A352012 a(n) = Sum_{p|n, p prime} (n-1)!/(p-1)!.
%H A352012 Robert Israel, <a href="/A352012/b352012.txt">Table of n, a(n) for n = 1..449</a>
%F A352012 E.g.f.: -Sum_{p prime} log(1-x^p)/p!.
%F A352012 a(n) = 1 if and only if n is prime.
%p A352012 f:= proc(n) local p;
%p A352012   add( (n-1)!/(p-1)!, p = numtheory:-factorset(n))
%p A352012 end proc:
%p A352012 map(f, [$1..30]): # _Robert Israel_, Nov 14 2024
%t A352012 a[1] = 0; a[n_] := (n - 1)! * Plus @@ (1/(FactorInteger[n][[;; , 1]] - 1)!); Array[a, 25] (* _Amiram Eldar_, Mar 01 2022 *)
%o A352012 (PARI) a(n) = sumdiv(n, d, isprime(d)*(n-1)!/(d-1)!);
%o A352012 (PARI) my(N=40, x='x+O('x^N)); concat(0, Vec(serlaplace(-sum(k=1, N, isprime(k)*log(1-x^k)/k!))))
%o A352012 (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, (n-1)!/(f[k,1]-1)!); \\ _Michel Marcus_, Mar 01 2022
%Y A352012 Cf. A087906, A352004, A352014.
%K A352012 nonn
%O A352012 1,4
%A A352012 _Seiichi Manyama_, Feb 28 2022