login
a(n) = Sum_{1 <= i, j, k <= n} gcd(i,j,k).
9

%I #30 May 23 2021 07:02:21

%S 1,9,30,76,141,267,400,624,885,1249,1590,2208,2689,3411,4248,5248,

%T 6081,7485,8530,10248,11889,13687,15228,17988,20053,22569,25242,28588,

%U 31053,35463,38284,42540,46581,50893,55362,61824,65857,71247,76884,84388,89349,97881,103342

%N a(n) = Sum_{1 <= i, j, k <= n} gcd(i,j,k).

%H Seiichi Manyama, <a href="/A344522/b344522.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{k=1..n} phi(k) * floor(n/k)^3.

%F G.f.: (1/(1 - x)) * Sum_{k >= 1} phi(k) * x^k * (1 + 4*x^k + x^(2*k))/(1 - x^k)^3.

%F a(n) ~ Pi^2 * n^3 / (6*zeta(3)). - _Vaclav Kotesovec_, May 23 2021

%t a[n_] := Sum[EulerPhi[k] * Quotient[n, k]^3, {k, 1, n}]; Array[a, 50] (* _Amiram Eldar_, May 22 2021 *)

%o (PARI) a(n) = sum(i=1, n, sum(j=1, n, sum(k=1, n, gcd([i, j, k]))));

%o (PARI) a(n) = sum(k=1, n, eulerphi(k)*(n\k)^3);

%o (PARI) my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k*(1+4*x^k+x^(2*k))/(1-x^k)^3)/(1-x))

%Y Column k=3 of A344479.

%Y Cf. A018806, A071778, A343497, A344132, A344521, A344523, A344524, A344525, A344526.

%K nonn

%O 1,2

%A _Seiichi Manyama_, May 22 2021