login
a(n) = (1/n) * Sum_{k=1..n} n^(n/gcd(n, k)).
7

%I #12 Sep 08 2022 08:46:25

%S 1,3,19,133,2501,15631,705895,8389641,258280489,4000040011,

%T 259374246011,2972033984173,279577021469773,4762288684702095,

%U 233543408203327951,9223372037928525841,778579070010669895697,13115469358498302735067,1874292305362402347591139

%N a(n) = (1/n) * Sum_{k=1..n} n^(n/gcd(n, k)).

%H Seiichi Manyama, <a href="/A332621/b332621.txt">Table of n, a(n) for n = 1..386</a>

%F a(n) = [x^n] Sum_{k>=1} Sum_{j>=1} phi(j) * n^(j-1) * x^(k*j).

%F a(n) = (1/n) * Sum_{k=1..n} n^(lcm(n, k)/k).

%F a(n) = (1/n) * Sum_{d|n} phi(d) * n^d.

%F a(n) = A332620(n) / n.

%t Table[(1/n) Sum[n^(n/GCD[n, k]), {k, 1, n}], {n, 1, 19}]

%t Table[(1/n) Sum[EulerPhi[d] n^d, {d, Divisors[n]}], {n, 1, 19}]

%t Table[SeriesCoefficient[Sum[Sum[EulerPhi[j] n^(j - 1) x^(k j), {j, 1, n}], {k, 1, n}], {x, 0, n}], {n, 1, 19}]

%o (Magma) [(1/n)*&+[n^(n div Gcd(n,k)):k in [1..n]]:n in [1..20]]; // _Marius A. Burtea_, Feb 17 2020

%o (PARI) a(n) = sum(k=1, n, n^(n/gcd(n, k)))/n; \\ _Michel Marcus_, Mar 10 2021

%Y Cf. A000010, A056665, A130586, A226561, A228640, A308814, A321349, A332620.

%K nonn

%O 1,2

%A _Ilya Gutkovskiy_, Feb 17 2020