The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #25 Apr 04 2023 14:12:58

%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.

%H Seiichi Manyama, <a href="/A247418/b247418.txt">Table of n, a(n) for n = 1..10000</a>

%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)).

%Y Cf. A002321, A344432.

%K sign,easy,look

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 02:15 EDT 2024. Contains 372536 sequences. (Running on oeis4.)