Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Sep 08 2022 08:46:23
%S 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,
%T 29,32,803,2,27035,2,1100,36,37,38,280418,2,41,42,64423,2,74133,2,
%U 1963,2046,49,2,5322467,9,2518,54,2735,2,157827,58,176427,60,61,2
%N a(n) = Sum_{d|n} (pod(d)/d), where pod(k) is the product of the divisors of k (A007955).
%H Antti Karttunen, <a href="/A322671/b322671.txt">Table of n, a(n) for n = 1..16384</a>
%F a(n) = n for n = 1, 2 and 4.
%F a(n) = n + (tau(n) - 1) = n + 3 for squarefree semiprimes (A006881).
%F a(n) = 2 if n is prime. - _Robert Israel_, Dec 23 2018
%e 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.
%p pod:= proc(n) convert(numtheory:-divisors(n),`*`) end proc:
%p f:= proc(n) local d; add(pod(d)/d, d = numtheory:-divisors(n)) end proc:
%p map(f, [$1..100]); # _Robert Israel_, Dec 23 2018
%t Array[Sum[Apply[Times, Divisors@ d]/d, {d, Divisors@ #}] &, 59] (* _Michael De Vlieger_, Jan 19 2019 *)
%o (Magma) [&+[&*[c: c in Divisors(d)] / d: d in Divisors(n)]: n in [1..100]]
%o (PARI) a(n) = sumdiv(n, d, vecprod(divisors(d))/d); \\ _Michel Marcus_, Dec 23 2018
%o (Python)
%o from math import isqrt
%o from sympy import divisor_count, divisors
%o 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
%Y Cf. A007955, A322672.
%K nonn
%O 1,2
%A _Jaroslav Krizek_, Dec 23 2018