The OEIS is supported by the many generous donors to the OEIS Foundation.

 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 60, we have over 367,000 sequences, and we’ve crossed 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A332517 a(n) = Sum_{k=1..n} gcd(n,k)^n. 16
 1, 5, 29, 274, 3129, 47515, 823549, 16843268, 387459861, 10009769725, 285311670621, 8918311856102, 302875106592265, 11112685048729175, 437893951473411261, 18447025557276459016, 827240261886336764193, 39346558373052524325225, 1978419655660313589123997 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS If n is prime, a(n) = n-1 + n^n. - Robert Israel, Feb 16 2020 LINKS Robert Israel, Table of n, a(n) for n = 1..386 FORMULA a(n) = Sum_{d|n} phi(n/d) * d^n. a(n) = Sum_{d|n} mu(n/d) * d * sigma_(n-1)(d). a(n) ~ n^n. From Richard L. Ollerton, May 09 2021: (Start) a(n) = Sum_{k=1..n} (n/gcd(n,k))^n*phi(gcd(n,k))/phi(n/gcd(n,k)). a(n) = Sum_{k=1..n} mu(n/gcd(n,k))*gcd(n,k)*sigma_(n-1)(gcd(n,k))/phi(n/gcd(n,k)). (End) MAPLE f:= n -> add(igcd(n, k)^n, k=1..n): map(f, [\$1..30]); # Robert Israel, Feb 16 2020 MATHEMATICA Table[Sum[GCD[n, k]^n, {k, 1, n}], {n, 1, 19}] Table[Sum[EulerPhi[n/d] d^n, {d, Divisors[n]}], {n, 1, 19}] Table[Sum[MoebiusMu[n/d] d DivisorSigma[n - 1, d], {d, Divisors[n]}], {n, 1, 19}] PROG (PARI) a(n) = sum(k=1, n, gcd(n, k)^n); \\ Michel Marcus, Feb 14 2020 (Magma) [&+[Gcd(n, k)^n:k in [1..n]]: n in [1..20]]; // Marius A. Burtea, Feb 15 2020 (Python) from sympy import totient, divisors def A332517(n): return sum(totient(d)*(n//d)**n for d in divisors(n, generator=True)) # Chai Wah Wu, Feb 15 2020 CROSSREFS Cf. A000010, A008683, A018804, A031971, A069097, A226561, A228640, A321294. Sequence in context: A177440 A292567 A355376 * A332469 A112799 A020531 Adjacent sequences: A332514 A332515 A332516 * A332518 A332519 A332520 KEYWORD nonn AUTHOR Ilya Gutkovskiy, Feb 14 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 1 23:26 EST 2023. Contains 367503 sequences. (Running on oeis4.)