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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199806 Alternating LCM-sum: a(n) = Sum_{k=1..n} (-1)^(k-1)*lcm(k,n). 1
1, 0, 0, 8, -5, 18, -14, 80, -9, 100, -44, 204, -65, 294, 30, 672, -119, 540, -152, 1040, 63, 1210, -230, 1752, -75, 2028, -54, 2996, -377, 2190, -434, 5440, 165, 4624, 280, 5472, -629, 6498, 234, 8800, -779, 6300, -860, 12188, 225, 11638, -1034, 14256, -245, 13000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000

Laszlo Toth, Weighted gcd-sum functions, J. Integer Sequences, 14 (2011), Article 11.7.7

PROG

(Sage)

def A199806(n) : return add((-1)^(k-1)*lcm(k, n) for k in (1..n))

[A199806(n) for n in (1..50)]  # Peter Luschny, Nov 10 2011

(PARI) a(n)=-sum(k=1, n, (-1)^k*lcm(k, n)) \\ Charles R Greathouse IV, Nov 10 2011

(MAGMA)  [&+[(-1)^(k-1)*Lcm(k, n):k in [1..n]]: n in [1..50]]; // Marius A. Burtea, Oct 02 2019

CROSSREFS

Cf. A051193, A199084.

Sequence in context: A168204 A193681 A253806 * A070484 A096480 A248292

Adjacent sequences:  A199803 A199804 A199805 * A199807 A199808 A199809

KEYWORD

sign

AUTHOR

Laszlo Toth, Nov 10 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 09:52 EST 2020. Contains 332323 sequences. (Running on oeis4.)