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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A333493 a(n) = Sum_{k=1..n} (-1)^(k+1) * lcm(n,k) / gcd(n,k). 0

%I #7 Mar 24 2020 14:05:21

%S 1,1,-2,13,-9,28,-20,109,-11,151,-54,256,-77,442,48,877,-135,757,-170,

%T 1363,103,1816,-252,2080,-59,3043,-38,3982,-405,2878,-464,7021,273,

%U 6937,390,6817,-665,9748,388,11059,-819,8407,-902,16348,219,17458,-1080,16672,-167

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

%H <a href="/index/Ga#gcd">Index entries for sequences related to gcd's</a>

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%F If n odd, a(n) = (1/2) * n * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / j^2.

%F If n even, a(n) = (1/2) * n^2 * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / (d * j^2).

%t Table[Sum[(-1)^(k + 1) LCM[n, k]/GCD[n, k], {k, 1, n}], {n, 1, 49}]

%o (PARI) a(n) = sum(k=1, n, (-1)^(k+1)*lcm(n, k)/gcd(n, k)); \\ _Michel Marcus_, Mar 24 2020

%Y Alternating row sums of A051537.

%Y Cf. A056789, A089913, A199084, A199806.

%K sign

%O 1,3

%A _Ilya Gutkovskiy_, Mar 24 2020

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 02:14 EDT 2024. Contains 371798 sequences. (Running on oeis4.)