login
This site is supported by donations 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). 1
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

Table of n, a(n) for n=1..59.

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 A294509

Adjacent sequences:  A247415 A247416 A247417 * A247419 A247420 A247421

KEYWORD

sign,easy

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 13:01 EDT 2019. Contains 328222 sequences. (Running on oeis4.)