%I #27 Jul 16 2022 12:36:54
%S 1,2,4,3,6,6,8,4,13,8,12,8,14,10,24,5,18,16,20,10,32,14,24,10,31,16,
%T 40,12,30,28,32,6,48,20,48,19,38,22,56,12,42,36,44,16,78,26,48,12,57,
%U 34,72,18,54,44,72,14,80,32,60,32,62,34,104,7,84,52,68,22,96,52,72,22,74
%N a(n) = Sum_{d|n} d^(d mod 2).
%C For each divisor d of n, add d if d is odd, otherwise add 1.
%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%F a(n) = A000593(n) + A183063(n).
%F a(n) = A065608(2n) - 2*A065608(n).
%F a(p) = p+1 for odd primes p. - _Wesley Ivan Hurt_, Nov 28 2021
%F a(n) = A000203(A000265(n))+A000005(A000265(n))*A007814(n). - _Chai Wah Wu_, Jul 16 2022
%e For n = 12, the divisors of 12 are 1, 2, 3, 4, 6, 12 with corresponding summands 1, 1, 3, 1, 1, 1, respectively. The sum is then a(12) = 1 + 1 + 3 + 1 + 1 + 1 = 8.
%t a[n_] := DivisorSum[n, #^Mod[#, 2] &]; Array[a, 100] (* _Amiram Eldar_, Nov 04 2021 *)
%o (PARI) a(n) = sumdiv(n, d, if (d%2, d, 1)); \\ _Michel Marcus_, Nov 04 2021
%o (Python)
%o from math import prod
%o from sympy import factorint
%o def A348915(n):
%o f = factorint(n>>(m:=(~n&n-1).bit_length())).items()
%o d = prod(e+1 for p,e in f)
%o s = prod((p**(e+1)-1)//(p-1) for p, e in f)
%o return s+d*m # _Chai Wah Wu_, Jul 16 2022
%Y Cf. A000005 (tau), A000203 (sigma), A000593, A065608, A183063.
%K nonn
%O 1,2
%A _Wesley Ivan Hurt_, Nov 03 2021