OFFSET
1,2
COMMENTS
For 1 <= k <= n, add 1 if gcd(n,k) = 1, otherwise add n. For n = 9, there are 6 numbers less than or equal to 9 that are relatively prime to 9 and 3 that are not. Then a(9) = 6*1 + 9*3 = 33.
FORMULA
a(n) = Sum_{k=1..n} n^(1 - floor(1/gcd(n,k))).
MATHEMATICA
Table[n + (n - 1)*(n - EulerPhi[n]), {n, 50}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 28 2021
STATUS
approved