OFFSET
1,2
COMMENTS
For each nontrivial divisor of n, take a running total: add d if d is a prime power (i.e., if d = p^k where p is prime and k is a positive integer), otherwise add 1. For example, a(12) = 2 + 3 + 4 + 1 + 1 = 11.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
If p is prime, a(p) = Sum_{d|p, d>1} d^floor(1/omega(d)) = p^floor(1/omega(p)) = p^1 = p.
If p is prime, a(p^m) = (p^(m+1)-p)/(p-1). - Robert Israel, Oct 09 2024
EXAMPLE
a(18) = Sum_{d|18, d>1} d^floor(1/omega(d)) = 2^1 + 3^1 + 6^0 + 9^1 + 18^0 = 16.
MAPLE
f:= proc(n) local t, D1, D2;
D1, D2:= selectremove(t -> nops(numtheory:-factorset(t))<= 1, numtheory:-divisors(n) minus {1});
convert(D1, `+`) + nops(D2)
end proc:
map(f, [$1..100]); # Robert Israel, Oct 09 2024
MATHEMATICA
Table[Sum[k^Floor[1/PrimeNu[k]] (1 - Ceiling[n/k] + Floor[n/k]), {k, 2, n}], {n, 100}]
PROG
(PARI) a(n) = sumdiv(n, d, if (d>1, if (omega(d)==1, d, 1))); \\ Michel Marcus, Oct 09 2024
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Wesley Ivan Hurt, Jun 06 2021
STATUS
approved