OFFSET
1,2
COMMENTS
For each divisor d of n, add n if d is even, otherwise add 1. For example, the divisors of 6 are 1,2,3,6 which would give a(6) = 1 + 6 + 1 + 6 = 14.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
MATHEMATICA
a[n_] := DivisorSum[n, n^Mod[# + 1, 2] &]; Array[a, 100] (* Wesley Ivan Hurt, Nov 12 2022 *)
PROG
(PARI) A349213(n) = sumdiv(n, d, n^((1+d)%2)); \\ Antti Karttunen, Nov 10 2021
(Python)
from sympy import divisor_count
def A349213(n): return (1+n*(m:=(~n&n-1).bit_length()))*divisor_count(n>>m) # Chai Wah Wu, Jul 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 10 2021
STATUS
approved