This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A342389 #14 Mar 10 2021 12:28:38 %S A342389 1,5,30,264,3135,46709,823564,16777528,387420759,10000003265, %T A342389 285311670666,8916100500148,302875106592331,11112006826381965, %U A342389 437893890380965260,18446744073726350224,827240261886336764313,39346408075296928032645 %N A342389 a(n) = Sum_{k=1..n} k^gcd(k,n). %F A342389 If p is prime, a(p) = A000217(p-1) + p^p = (p-1)*p/2 + p^p. %t A342389 a[n_] := Sum[k^GCD[k, n], {k, 1, n}]; Array[a, 18] (* _Amiram Eldar_, Mar 10 2021 *) %o A342389 (PARI) a(n) = sum(k=1, n, k^gcd(k, n)); %Y A342389 Cf. A000217, A228640, A342394, A342395. %K A342389 nonn,easy %O A342389 1,2 %A A342389 _Seiichi Manyama_, Mar 10 2021