login
The number of distinct factorials that are unitarily dividing n.
2

%I #9 Dec 23 2025 04:20:25

%S 1,2,1,1,1,3,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,2,1,1,1,3,1,1,1,2,

%T 1,1,1,2,1,1,1,3,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,3,1,1,

%U 1,2,1,1,1,2,1,1,1,3,1,1,1,2,1,1,1,2,1,1

%N The number of distinct factorials that are unitarily dividing n.

%C 1 = 0! = 1! is counted once.

%C The only possible terms are 1, 2, and 3.

%H Amiram Eldar, <a href="/A391901/b391901.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) <= A055881(n).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} phi(k!)/k!^2 = Sum_{k>=1} 1/A123476(k) = Sum_{k>=1} A373318(k!)/A373319(k!) = 1.32208875598753557308... .

%t a[n_] := Module[{f = 1, k = 1, c = 0}, While[f <= n, If[Divisible[n, f] && CoprimeQ[f, n/f], c++]; k++; f *= k]; c]; Array[a, 100]

%o (PARI) a(n) = {my(f = 1, k = 1, c = 0); while(f <= n, if(!(n % f) && gcd(f, n/f) == 1, c++); k++; f *= k); c;}

%Y Cf. A000010 (phi), A000142, A048855, A055881, A077610, A123476, A373318, A373319.

%K nonn,easy

%O 1,2

%A _Amiram Eldar_, Dec 23 2025