login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A345091
a(n) = Sum_{k=1..n} k^floor(1/gcd(n,k)).
3
1, 2, 4, 6, 11, 10, 22, 20, 30, 26, 56, 32, 79, 50, 67, 72, 137, 66, 172, 92, 135, 122, 254, 112, 255, 170, 252, 184, 407, 142, 466, 272, 343, 290, 431, 240, 667, 362, 483, 344, 821, 282, 904, 464, 561, 530, 1082, 416, 1036, 530, 835, 652, 1379, 522, 1115, 704, 1047, 842
OFFSET
1,2
LINKS
FORMULA
If p is prime, a(p) = Sum_{k=1..p} k^floor(1/gcd(p,k)) = 1^1 + ... + (p-1)^1 + p^0 = p*(p-1)/2 + 1.
a(1) = 1, a(n) = n + (n-2)*phi(n)/2 for n >= 2. - Wesley Ivan Hurt, Nov 24 2021
EXAMPLE
a(6) = Sum_{k=1..6} k^floor(1/gcd(6,k)) = 1^1 + 2^0 + 3^0 + 4^0 + 5^1 + 6^0 = 1 + 1 + 1 + 1 + 5 + 1 = 10.
MATHEMATICA
Table[Sum[k^Floor[1/GCD[n, k]], {k, n}], {n, 80}]
PROG
(PARI) A345091(n) = if(1==n, n, n + ((n-2)*eulerphi(n)/2)); \\ Antti Karttunen, Nov 25 2021
CROSSREFS
Cf. A000010 (phi), A345090.
Sequence in context: A088906 A303752 A304532 * A279911 A063183 A057661
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Jun 07 2021
STATUS
approved