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