Copyright | (c) 2018 Andrew Lelechenko |
---|---|

License | MIT |

Maintainer | Andrew Lelechenko <andrew.lelechenko@gmail.com> |

Stability | Provisional |

Portability | Non-portable (GHC extensions) |

Safe Haskell | None |

Language | Haskell2010 |

Values of Mertens function.

# Documentation

mertens :: Word -> Int Source #

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

`>>>`

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

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.