OFFSET
1,2
COMMENTS
Let v_p(n) denote the valuation of n at the prime p. The set D_n of divisors of n can be made into an abelian (D_n, +) group by setting: d + e := Product_{p|n} p^((v_p(d)+v_p(e)) mod (v_p(n)+1)), since for each divisor d of n we have the inequalities 0 <= v_p(d) <= v_p(n), so v_p(d) can be seen as a number mod (v_p(n)+1). This group is isomorphic to the abelian group (Z/(a_1+1))x...x(Z/(a_r+1)) where n := p_1^a_1 * ... * p_r^a_r is the prime factorization of n. The number a(n) is the trace of the addition table of this group for n, where the divisors are ordered by their absolute value.
If n = q^e * m^2 (by Euler) is an odd perfect number, with q prime and q == e == 1 (mod 4), then n = ((q+1)/2) * (a(n)/2) where the factors in the right-hand side are natural numbers.
LINKS
FORMULA
a(n) is multiplicative with a(p^v) = sigma(p^v)*(p^v+p^(2*floor(v/2)+1))/(p^v*(p+1)), where sigma(n) = A000203(n) is the sum of divisors of n.
If we denote eta(n,d):=Product_{p|n, 2*v_p(d)>=v_p(n)+1} p^(v_p(n)+1) for a divisor d|n, then we have a(n) = Sum_{d|n} d^2/eta(n,d).
Multiplicative with a(p^v) = (p^(v+1)-1)/(p-1) if v is even and a(p^v) = 2*(p^(v+1)-1)/(p^2-1) otherwise. - Chai Wah Wu, Nov 19 2023
a(n) = A000203(n) if and only if n is a square. - Chai Wah Wu, Nov 20 2023
EXAMPLE
For n = 3 the divisors are {1,3} and the addition table is given by [[1,3],[3,1]] with trace equal to the sum of the elements on the diagonal which are 1+1 = 2.
MATHEMATICA
f[p_, e_] := If[EvenQ[e], (p^(e + 1) - 1)/(p - 1), 2*(p^(e + 1) - 1)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 22 2023 *)
PROG
(SageMath)
def a(n):
return sigma(n)*prod((p**valuation(n, p)+p**(2*floor(valuation(n, p)/2)+1))/(p**valuation(n, p)*(p+1)) for p in prime_divisors(n))
(PARI) b(n, d) = my(f=factor(n)); prod(k=1, #f~, if(2*valuation(d, f[k, 1])>=valuation(n, f[k, 1])+1, {f[k, 1]^(valuation(n, f[k, 1])+1)}, {1}));
a(n) = my(d=divisors(n)); sumdiv(n, d, d^2/b(n, d));
(PARI) a(n)=my(f=factor(n)); sigma(n)*prod(k=1, #f~, (f[k, 1]^valuation(n, f[k, 1])+f[k, 1]^(2*floor(valuation(n, f[k, 1])/2)+1))/(f[k, 1]^valuation(n, f[k, 1])*(f[k, 1]+1) ));
(PARI) a(n) = my(d=divisors(n), f=factor(n), m=matrix(#d, #d, i, j, prod(k=1, #f~, f[k, 1]^((valuation(d[i], f[k, 1])+valuation(d[j], f[k, 1])) % (1+f[k, 2]))))); trace(m); \\ Michel Marcus, Nov 10 2023
(Python)
from math import prod
from sympy import factorint
def A367197(n): return prod((p**(e+1)-1<<1)//(p**2-1) if e&1 else (p**(e+1)-1)//(p-1) for p, e in factorint(n).items()) # Chai Wah Wu, Nov 19 2023
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Orges Leka, Nov 10 2023
STATUS
approved