OFFSET
1,3
FORMULA
a(n) = Sum_{d|n} (n/d)^(d-2) * (d-1).
If p is prime, a(p) = p - 1.
MATHEMATICA
a[n_] := DivisorSum[n, (n/#)^(#-2) * (#-1) &]; Array[a, 50] (* Amiram Eldar, Jul 18 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, (n/d)^(d-2)*(d-1));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 13 2023
STATUS
approved