A322671 a(n) = Sum_{d|n} (pod(d)/d), where pod(k) is the product of the divisors of k (A007955).
1, 2, 2, 4, 2, 9, 2, 12, 5, 13, 2, 155, 2, 17, 18, 76, 2, 336, 2, 415, 24, 25, 2, 13987, 7, 29, 32, 803, 2, 27035, 2, 1100, 36, 37, 38, 280418, 2, 41, 42, 64423, 2, 74133, 2, 1963, 2046, 49, 2, 5322467, 9, 2518, 54, 2735, 2, 157827, 58, 176427, 60, 61, 2
Offset: 1
Keywords
Examples
For n = 6; a(6) = pod(1)/1 + pod(2)/2 + pod(3)/3 + pod(6)/6 = 1/1 + 2/2 + 3/3 + 36/6 = 9.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Programs
-
Magma
[&+[&*[c: c in Divisors(d)] / d: d in Divisors(n)]: n in [1..100]];
-
Maple
pod:= proc(n) convert(numtheory:-divisors(n),`*`) end proc: f:= proc(n) local d; add(pod(d)/d, d = numtheory:-divisors(n)) end proc: map(f, [$1..100]); # Robert Israel, Dec 23 2018
-
Mathematica
Array[Sum[Apply[Times, Divisors@ d]/d, {d, Divisors@ #}] &, 59] (* Michael De Vlieger, Jan 19 2019 *)
-
PARI
a(n) = sumdiv(n, d, vecprod(divisors(d))/d); \\ Michel Marcus, Dec 23 2018
-
Python
from math import isqrt from sympy import divisor_count, divisors def A322671(n): return sum(isqrt(d)**(c-2) if (c:=divisor_count(d)) & 1 else d**(c//2-1) for d in divisors(n,generator=True)) # Chai Wah Wu, Jun 25 2022
Formula
a(n) = n for n = 1, 2 and 4.
a(n) = n + (tau(n) - 1) = n + 3 for squarefree semiprimes (A006881).
a(n) = 2 if n is prime. - Robert Israel, Dec 23 2018