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 A199084 #40 Mar 30 2024 03:01:30 %S A199084 1,-1,3,-4,5,-5,7,-12,9,-9,11,-20,13,-13,15,-32,17,-21,19,-36,21,-21, %T A199084 23,-60,25,-25,27,-52,29,-45,31,-80,33,-33,35,-84,37,-37,39,-108,41, %U A199084 -65,43,-84,45,-45,47,-160,49,-65,51,-100,53,-81,55,-156,57 %N A199084 a(n) = Sum_{k=1..n} (-1)^(k+1) gcd(k,n). %C A199084 The alternating sum analog of A018804. %C A199084 a(2n) <= -(2n-1) (cf. A344372). - _Max Alekseyev_, May 16 2021 %H A199084 Vincenzo Librandi and Seiichi Manyama, <a href="/A199084/b199084.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Vincenzo Librandi) %H A199084 Laszlo Toth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Toth/toth9.html">Weighted Gcd-Sum Functions</a>, J. Int. Seq. 14 (2011) # 11.7.7. %F A199084 a(2n+1) = 2n+1. - _Seiichi Manyama_, Dec 09 2016 %F A199084 a(n) = (-1)^(n+1)*A344371(n) = A344373(n) - (-1)^n*n. - _Max Alekseyev_, May 16 2021 %F A199084 a(2n) = -A344372(n). - _Max Alekseyev_, May 16 2021 %F A199084 Sum_{k=1..n} a(k) ~ (n^2/Pi^2) * (-log(n) - 2*gamma + 1/2 + 4*log(2)/3 + Pi^2/4 + zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - _Amiram Eldar_, Mar 30 2024 %p A199084 A199084 := proc(n) %p A199084 add((-1)^(k-1)* igcd(k,n),k=1..n) ; %p A199084 end proc: %p A199084 seq(A199084(n),n=1..80) ; %t A199084 altGCDSum[n_] := Sum[(-1)^(i + 1)GCD[i, n], {i, n}]; Table[altGCDSum[n], {n, 50}] (* _Alonso del Arte_, Nov 02 2011 *) %t A199084 Total/@Table[(-1)^(k+1) GCD[k,n],{n,60},{k,n}] (* _Harvey P. Dale_, May 29 2013 *) %o A199084 (PARI) a(n) = sum(k=1, n, (-1)^(k+1)*gcd(k,n)); \\ _Michel Marcus_, Jun 28 2023 %Y A199084 Cf. A001620, A018804, A106475, A306016, A344371, A344372, A344373. %K A199084 sign,easy %O A199084 1,3 %A A199084 _R. J. Mathar_, Nov 02 2011