arithmoi-0.12.1.0: Efficient basic number-theoretic functions.
Copyright(c) 2018 Andrew Lelechenko
LicenseMIT
MaintainerAndrew Lelechenko <andrew.lelechenko@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.NumberTheory.ArithmeticFunctions.Mertens

Description

Values of Mertens function.

Synopsis

Documentation

mertens :: Word -> Int Source #

Compute individual values of Mertens function in O(n^(2/3)) time and space.

>>> map (mertens . (10 ^)) [0..9]
[1,-1,1,2,-23,-48,212,1037,1928,-222]

The implementation follows Theorem 3.1 from Computations of the Mertens function and improved bounds on the Mertens conjecture by G. Hurst, excluding segmentation of sieves.