[Haskell-cafe] NumberTheory library

ajb at spamcop.net ajb at spamcop.net
Thu May 5 00:20:25 EDT 2005

G'day all.

Quoting Bo Herlin <bo at gcab.net>:

> But there are functions that I cant find and that I assume others before
> me must have missed and then perhaps also implemented them.
> Is there any standard library with functions like:
> binomial
> isCatalan
> nthCatalan
> nextCatalan
> isPrime
> nthPrime
> nextPrime
> factorize
> isFibonacci
> nthFibonacci
> nextFibonacci

You might want to check out the archives of the mailing list, too.  These
sorts of problems occasionally get solved.  For the record, here are a few
of my attempts:

    http://andrew.bromage.org/Fib.hs         (Fairly fast Fibonacci numbers)
    http://andrew.bromage.org/WheelPrime.hs  (Fast factorisation)
    http://andrew.bromage.org/Prime.hs       (AKS primality testing)

Andrew Bromage

More information about the Haskell-Cafe mailing list