OFFSET
1,4
FORMULA
a(n) = Sum_{i=2..l/2} (tau(e(d[i])) - 1)*(tau(e(d[l-i+1])) - 1) + E(n), where d = Divisors(n^n), l = |d|, e(x) = gcd of the exponent list in the prime factorization of x, and E(n) = 0 if n is odd, otherwise E(n) = b*(b + 1)/2 with b = tau(e(d[(l + 1)/2])) - 1.
EXAMPLE
a(4) = 7 because 4^4 = 2^2*2^6 = 2^2*4^3 = 2^2*8^2 = 2^3*2^5 = 2^4*2^4 = 2^4*4^2 = 4^2*4^2.
MAPLE
with(NumberTheory):
A390604 := proc(n)
local d, l, i, e, g, t, a, b, p;
e := proc(x) local p; igcd(seq(p[2], p in ifactors(x)[2])) end proc;
d := sort(convert(Divisors(n^n), list));
l := nops(d);
a := 0;
for i from 2 to iquo(l, 2) do
g := e(d[i]);
t := e(d[l-i+1]);
a := a + (tau(g)-1)*(tau(t)-1);
od;
if type(n, even) then
b := tau(e(d[(l+1)/2]))-1;
a := a + b*(b+1)/2;
fi;
a
end proc:
seq(A390604(n), n=1..55);
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Nov 12 2025
STATUS
approved
