OFFSET
1,4
COMMENTS
If p is prime, a(p) = p * Sum_{p|p} gcd(p,p/p) / p = p * (1/p) = 1.
EXAMPLE
a(18) = 18 * Sum_{p|18} gcd(p,18/p) / p = 18 * (gcd(2,9)/2 + gcd(3,6)/3) = 18 * (1/2 + 1) = 27.
MATHEMATICA
Table[n*Sum[(1/k) GCD[k, n/k] (PrimePi[k] - PrimePi[k - 1]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 13 2021
STATUS
approved