The Möbius function and statistical mechanics