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”).
%I #35 Sep 13 2024 11:59:01
%S 0,1,4,13,44,140,512,1782,6652,24682,93599,354341,1359470,5210328,
%T 20098886,77621774,300797854,1167164438,4539201401,17674941735,
%U 68933414989,269143872226,1052114789548,4116808923486,16124224585644,63205911146740,247961982954952
%N a(n) = Sum_{1 <= x_1 <= x_2 <= ... <= x_n <= n} gcd(x_1, x_2, ..., x_n).
%H Seiichi Manyama, <a href="/A345230/b345230.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = Sum_{k=1..n} Sum_{d|k} phi(k/d) * binomial(d+n-2, n-1).
%F a(n) = [x^n] (1/(1 - x)) * Sum_{k >= 1} phi(k) * x^k/(1 - x^k)^n.
%F a(n) ~ 2^(2*n-1) / sqrt(Pi*n). - _Vaclav Kotesovec_, Jun 11 2021
%F a(n) = Sum_{k=1..n} phi(k) * binomial(floor(n/k)+n-1,n). - _Seiichi Manyama_, Sep 13 2024
%p a:= n-> coeff(series((1/(1-x))* add(numtheory[phi](k)
%p *x^k/(1-x^k)^n, k=1..n), x, n+1), x, n):
%p seq(a(n), n=0..26); # _Alois P. Heinz_, Jun 11 2021
%t a[n_] := Sum[DivisorSum[k, EulerPhi[k/#] * Binomial[n + # - 2, n - 1] &], {k, 1, n}]; Array[a, 30, 0] (* _Amiram Eldar_, Jun 11 2021 *)
%o (PARI) a(n) = sum(k=1, n, sumdiv(k, d, eulerphi(k/d)*binomial(d+n-2, n-1)));
%o (PARI) a(n) = sum(k=1, n, eulerphi(k)*binomial(n\k+n-1, n)); \\ _Seiichi Manyama_, Sep 13 2024
%Y Main diagonal of A345229.
%Y Cf. A343517, A343553, A344525.
%K nonn
%O 0,3
%A _Seiichi Manyama_, Jun 11 2021