arithmoi-0.13.0.0: Efficient basic number-theoretic functions.

Copyright | (c) 2018 Andrew Lelechenko
License | MIT
Maintainer | Andrew Lelechenko <andrew.lelechenko@gmail.com>
Safe Haskell | Safe-Inferred
Language | Haskell2010

Math.NumberTheory.ArithmeticFunctions.Mertens

Description

Values of Mertens function.

Synopsis

- mertens :: Word -> Int

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