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!)
A247418 a(n) = Sum_{i=1..n} mu(i)*(-1)^(i+1). 2
1, 2, 1, 1, 0, -1, -2, -2, -2, -3, -4, -4, -5, -6, -5, -5, -6, -6, -7, -7, -6, -7, -8, -8, -8, -9, -9, -9, -10, -9, -10, -10, -9, -10, -9, -9, -10, -11, -10, -10, -11, -10, -11, -11, -11, -12, -13, -13, -13, -13, -12, -12, -13, -13, -12, -12, -11, -12, -13 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Alternating sums of mu(n), the Moebius function (A008683), from 1 to n.
LINKS
FORMULA
a(n) = Sum_{i=1..n} A008683(i)*(-1)^(i+1).
EXAMPLE
a(n) = mu(1) - mu(2) + mu(3) - mu(4) + ... + (-1)^(n+1) * mu(n).
MAPLE
with(numtheory): A247418:=n->add(mobius(i)*(-1)^(i+1), i=1..n): seq(A247418(n), n=1..50);
MATHEMATICA
Table[Sum[MoebiusMu[i] (-1)^(i + 1), {i, n}], {n, 50}]
Accumulate[Table[MoebiusMu[n](-1)^(n+1), {n, 60}]] (* Harvey P. Dale, Oct 19 2018 *)
PROG
(PARI) a(n) = sum(i=1, n, moebius(i)*(-1)^(i+1)); \\ Michel Marcus, Sep 18 2014
CROSSREFS
Cf. A008683 (moebius function).
Cf. A068773 (alternating sums of eulerphi(n)).
Cf. A068762 (alternating sums of sigma(n)).
Sequence in context: A281871 A131334 A004602 * A229899 A153764 A348422
KEYWORD
sign,easy,look
AUTHOR
Wesley Ivan Hurt, Sep 16 2014
STATUS
approved

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 March 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)