login
A351711
a(n) = Sum_{p|n, p prime} Sum_{d|n} gcd(d,p).
4
0, 3, 4, 5, 6, 14, 8, 7, 7, 18, 12, 22, 14, 22, 20, 9, 18, 23, 20, 28, 24, 30, 24, 30, 11, 34, 10, 34, 30, 52, 32, 11, 32, 42, 28, 36, 38, 46, 36, 38, 42, 60, 44, 46, 32, 54, 48, 38, 15, 31, 44, 52, 54, 32, 36, 46, 48, 66, 60, 80, 62, 70, 38, 13, 40, 76, 68, 64, 56, 68, 72, 49
OFFSET
1,2
LINKS
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
Cf. A001221 (omega), A000005 (tau), A351758.
Sequence in context: A107228 A377053 A355706 * A294247 A346310 A083401
KEYWORD
nonn,look
AUTHOR
Wesley Ivan Hurt, Feb 16 2022
STATUS
approved