arithmoi-0.4.0.0: Efficient basic number-theoretic functions. Primes, powers, integer logarithms.

PortabilityNon-portable (GHC extensions)
StabilityProvisional
MaintainerDaniel Fischer <daniel.is.fischer@googlemail.com>
Safe HaskellSafe-Infered

Math.NumberTheory.MoebiusInversion

Description

Generalised Moebius inversion

Synopsis

Documentation

totientSum :: Int -> IntegerSource

totientSum n is, for n > 0, the sum of [totient k | k <- [1 .. n]], computed via generalised Moebius inversion. Arguments less than 1 cause an error to be raised.