OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(p) = p + 1, p prime.
a(n) = tau(n)*omega(n) + Sum_{p|n, p prime} (p-1)*tau(n/p).
EXAMPLE
a(6) = 14; a(6) = Sum_{p|6, p prime} Sum_{d|6} gcd(d,p) = gcd(1,2) + gcd(2,2) + gcd(3,2) + gcd(6,2) + gcd(1,3) + gcd(2,3) + gcd(3,3) + gcd(6,3) = 1 + 2 + 1 + 2 + 1 + 1 + 3 + 3 = 14.
MAPLE
f:= proc(n) local p, P; uses numtheory;
P:= factorset(n);
tau(n)*nops(P)+add((p-1)*tau(n/p), p=P);
end proc:
map(f, [$1..100]); # Robert Israel, Dec 05 2022
PROG
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, (f[k, 1]-1)*numdiv(n/f[k, 1])) + omega(f)*numdiv(f); \\ Michel Marcus, Feb 18 2022
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Wesley Ivan Hurt, Feb 16 2022
STATUS
approved