OFFSET
1,2
COMMENTS
For each divisor d of n, add d if d is semiprime, otherwise add 1. For example, the divisors of 24 are: 1, 2, 3, 4, 6, 8, 12, 24, and the only semiprime divisors of 24 are 4 and 6, so a(24) = 1 + 1 + 1 + 4 + 6 + 1 + 1 + 1 = 16.
FORMULA
a(p) = Sum_{d|p} d^[Omega(d) = 2] = 1^0 + p^0 = 2, for primes p.
EXAMPLE
a(n) = Sum_{d|12} d^[Omega(d) = 2] = 1^0 + 2^0 + 3^0 + 4^1 + 6^1 + 12^0 = 14.
MATHEMATICA
Table[Sum[k^KroneckerDelta[PrimeOmega[k], 2] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
PROG
(PARI) a(n) = sumdiv(n, d, if (bigomega(d)==2, d, 1)); \\ Michel Marcus, Jun 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 13 2021
STATUS
approved