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

%I

%S 1,2,1,1,0,-1,-2,-2,-2,-3,-4,-4,-5,-6,-5,-5,-6,-6,-7,-7,-6,-7,-8,-8,

%T -8,-9,-9,-9,-10,-9,-10,-10,-9,-10,-9,-9,-10,-11,-10,-10,-11,-10,-11,

%U -11,-11,-12,-13,-13,-13,-13,-12,-12,-13,-13,-12,-12,-11,-12,-13

%N a(n) = Sum_{i=1..n} mu(i)*(-1)^(i+1).

%C Alternating sums of mu(n), the Moebius function (A008683), from 1 to n.

%F a(n) = sum_{i=1..n} A008683(i)*(-1)^(i+1).

%e a(n) = mu(1) - mu(2) + mu(3) - mu(4) + ... + (-1)^(n+1) * mu(n).

%p with(numtheory): A247418:=n->add(mobius(i)*(-1)^(i+1), i=1..n): seq(A247418(n), n=1..50);

%t Table[Sum[MoebiusMu[i] (-1)^(i + 1), {i, n}], {n, 50}]

%t Accumulate[Table[MoebiusMu[n](-1)^(n+1),{n,60}]] (* _Harvey P. Dale_, Oct 19 2018 *)

%o (PARI) a(n) = sum(i=1, n, moebius(i)*(-1)^(i+1)); \\ _Michel Marcus_, Sep 18 2014

%Y Cf. A008683 (moebius function).

%Y Cf. A068773 (alternating sums of eulerphi(n)).

%Y Cf. A068762 (alternating sums of sigma(n)).

%K sign,easy

%O 1,2

%A _Wesley Ivan Hurt_, Sep 16 2014

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 23 04:44 EST 2019. Contains 320411 sequences. (Running on oeis4.)