OFFSET
1,3
LINKS
Paul Erdős, S. W. Graham, Alexsandr Ivić, and Carl Pomerance, On the number of divisors of n!, Analytic Number Theory, Proceedings of a Conference in Honor of Heini Halberstam, ed. by B. C. Berndt, H. G. Diamond, A. J. Hildebrand, Birkhauser 1996, pp. 337-355.
J. Sondow and E. W. Weisstein, MathWorld: Smarandache Function
FORMULA
a(n) = A027423(n)-A027423(n-1) = A000005(A000142(n))-A000005(A000142(n-1)) i.e., number of divisors of n! which are not divisors of (n-1)! [for n>1]. - Henry Bottomley, Oct 22 2001
Erdős, Graham, Ivić, & Pomerance show that the average order of log a(n) is c log n/(log log n)^2 with c around 0.6289. - Charles R Greathouse IV, Jul 21 2015
MATHEMATICA
a[n_] := DivisorSigma[0, n!] - DivisorSigma[0, (n-1)!]; a[1] = 1;
Array[a, 36] (* Jean-François Alcover, Sep 17 2020 *)
PROG
(PARI) a(n)=numdiv(n!)-numdiv((n-1)!) \\ Charles R Greathouse IV, Jul 21 2015
(Python)
from math import prod
from collections import Counter
from sympy import factorint
def A038024(n):
if n == 1: return 1
a = sum((Counter(factorint(i)) for i in range(2, n)), start=Counter())
return prod(e+1 for e in (a+Counter(factorint(n))).values())-prod(e+1 for e in a.values()) # Chai Wah Wu, Feb 23 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
