The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A199084 a(n) = Sum_{k=1..n} (-1)^(k+1) gcd(k,n). 4
 1, -1, 3, -4, 5, -5, 7, -12, 9, -9, 11, -20, 13, -13, 15, -32, 17, -21, 19, -36, 21, -21, 23, -60, 25, -25, 27, -52, 29, -45, 31, -80, 33, -33, 35, -84, 37, -37, 39, -108, 41, -65, 43, -84, 45, -45, 47, -160, 49, -65, 51, -100, 53, -81, 55, -156, 57 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS The alternating sum analog of A018804. LINKS Vincenzo Librandi and Seiichi Manyama, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi) L. Toth, Weighted Gcd-Sum Functions, J. Int. Seq. 14 (2011) # 11.7.7 FORMULA a(2n+1) = 2n+1. - Seiichi Manyama, Dec 09 2016 MAPLE A199084 := proc(n)         add((-1)^(k-1)* igcd(k, n), k=1..n) ; end proc: seq(A199084(n), n=1..80) ; MATHEMATICA altGCDSum[n_] := Sum[(-1)^(i + 1)GCD[i, n], {i, n}]; Table[altGCDSum[n], {n, 50}] (* Alonso del Arte, Nov 02 2011 *) Total/@Table[(-1)^(k+1) GCD[k, n], {n, 60}, {k, n}] (* Harvey P. Dale, May 29 2013 *) CROSSREFS Cf. A018804. Sequence in context: A261017 A024357 A300778 * A322004 A240214 A181132 Adjacent sequences:  A199081 A199082 A199083 * A199085 A199086 A199087 KEYWORD sign,easy AUTHOR R. J. Mathar, Nov 02 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 08:11 EST 2021. Contains 340385 sequences. (Running on oeis4.)