Compute the Mertens function
Mathematica, 22 20 bytes

Thanks to @miles for saving 2 bytes.

Tr@*MoebiusMu@*Range


Explanation

Range


Generate a list from 1 to input.

MoebiusMu


Find MoebiusMu of each number

Tr


Sum the result.