OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n) = A000203(n) - A034448(n) = sigma(n) - usigma(n). a(1) = 0, a(p) = 0, a(pq) = 0, a(pq...z) = 0, a(p^k) = (p^k - p) / (p - 1), for p = primes (A000040), pq = product of two distinct primes (A006881), pq...z = product of k (k >=2) distinct primes p, q, ..., z (A120944), p^k = prime powers (A000961(n) for n > 1) k = natural numbers (A000027).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (Pi^2/12) * (1 - 1/zeta(3)) = 0.1382506... . - Amiram Eldar, Dec 09 2022
EXAMPLE
If n = 1000, the 12 non-unitary divisors are {2, 4, 5, 10, 20, 25, 40, 50, 100, 200, 250, 500} and their sum is a(n) = a(1000) = 1206. a(16) = a(2^4) = (2^4 - 2) / (2 - 1)= 14.
MATHEMATICA
us[n_Integer] := (d = Divisors[n]; l = Length[d]; k = 1; s = n; While[k < l, If[ GCD[ d[[k]], n/d[[k]] ] == 1, s = s + d[[k]]]; k++ ]; s); Table[ DivisorSigma[1, n] - us[n], {n, 1, 100} ]
(* Second program: *)
Table[DivisorSum[n, # &, ! CoprimeQ[#, n/#] &], {n, 91}] (* Michael De Vlieger, Nov 20 2017 *)
PROG
(PARI) a(n)=my(f=factor(n)); sigma(f)-prod(i=1, #f~, f[i, 1]^f[i, 2]+1) \\ Charles R Greathouse IV, Jun 17 2015
(Python)
from sympy.ntheory.factor_ import divisor_sigma, udivisor_sigma
def A048146(n): return divisor_sigma(n)-udivisor_sigma(n) # Chai Wah Wu, Aug 22 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by Jaroslav Krizek, Mar 01 2009
STATUS
approved