OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = uphi(n) * Sum_{p^e || n} (e/(p^e-1)), where uphi = A047994, and p^e || n denotes that the prime power p^e unitarily divides n (i.e., p^e divides n but p^(e+1) does not divide n).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = c1 * c2 = 0.31889766457764592387..., c1 = Product_{p prime}(1 - 1/(p*(p+1))) = A065463, and c2 = Sum_{p prime}(p^2/((p^2-1)*(p^2+p-1))) = 0.45269528731431531046... .
EXAMPLE
For n = 12 and the integers k from 1 to 12, the greatest divisor of k that is a unitary divisor of 12 are 1, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1 and 12, respectively. The prime powers are 3 = 3^1, 4 = 2^2, 3 = 3^1, 4 = 2^2 and 3 = 3^1, and the sum of the exponents is a(12) = 1 + 2 + 1 + 2 + 1 = 7.
MATHEMATICA
a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; Times @@ (p^e-1) * Total[e/(p^e-1)]]; a[1] = 0; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^f[i, 2]-1) * sum(i = 1, #f~, f[i, 2]/(f[i, 1]^f[i, 2] - 1)); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jun 21 2025
STATUS
approved
