%I #19 Nov 28 2021 11:44:23
%S 1,3,4,4,6,7,8,5,5,9,12,9,14,11,10,6,18,9,20,11,12,15,24,11,7,17,6,13,
%T 30,15,32,7,16,21,14,12,38,23,18,13,42,17,44,17,12,27,48,13,9,11,22,
%U 19,54,11,18,15,24,33,60,19,62,35,14,8,20,21,68,23,28,19,72,15,74,41,12
%N a(n) = Sum_{d|n} d^c(d), where c is the prime characteristic (A010051).
%C For each divisor d of n, add d if d is prime, otherwise add 1. For example, a(6) = 1 + 2 + 3 + 1 = 7.
%H Antti Karttunen, <a href="/A349215/b349215.txt">Table of n, a(n) for n = 1..20000</a>
%F a(n) = A000005(n)+A008472(n)-A001221(n). - _Chai Wah Wu_, Nov 11 2021
%F a(p) = p+1 for primes p. - _Wesley Ivan Hurt_, Nov 28 2021
%t a[n_] := DivisorSum[n, #^Boole[PrimeQ[#]] &]; Array[a, 75] (* _Amiram Eldar_, Nov 11 2021 *)
%o (PARI) a(n) = sumdiv(n, d, if (isprime(d), d, 1)); \\ _Michel Marcus_, Nov 11 2021
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A349215(n):
%o fs = factorint(n)
%o return sum(a-1 for a in fs.keys())+prod(1+d for d in fs.values()) # _Chai Wah Wu_, Nov 11 2021
%Y Inverse Moebius transform of A089026.
%Y Cf. A010051, A000005 (tau), A008472 (sopf), A001221 (omega).
%K nonn
%O 1,2
%A _Wesley Ivan Hurt_, Nov 10 2021