OFFSET
1,2
COMMENTS
Sum of the divisors of n of the form p, p^2, or p*q, where p and q are prime.
FORMULA
a(n) = Sum_{d|n} d * (u(d) + v(d)), where u is the prime characteristic and v is the semiprime characteristic.
MATHEMATICA
a[n_] := DivisorSum[n, # &, 0 < PrimeOmega[#] <= 2 &]; Array[a, 100] (* Amiram Eldar, Dec 26 2021 *)
PROG
(PARI) a(n) = sumdiv(n, d, if (isprime(d) || (bigomega(d)==2), d)); \\ Michel Marcus, Dec 26 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Dec 25 2021
STATUS
approved