antiprimes-0.1.0.0: Initial project template from stack

Safe HaskellSafe
LanguageHaskell2010

AntiPrimes

Description

a.k.a. highliy composite numbers

Synopsis

Documentation

type Nui = Int Source #

Number under investigation

type Siz = Int Source #

number of divisors of Nui

type Lst = [(Nui, Siz)] Source #

list of tuples: numbers and their divisor sizes

size :: Nui -> Siz Source #

calculate the "size" of all possible factors of a number

>>> import qualified AntiPrimes as AP
>>> AP.size 12
6                -- as [1,2,3,4,6,12] are possible

dividers :: Nui -> [Int] Source #

calculate all possible dividers of a number

>>> import qualified AntiPrimes as AP
>>> AP.dividers 12
[1,2,3,4,6,12]

proof :: Nui -> Bool Source #

proof if a number is an antiprime

>>> import qualified AntiPrimes as AP
>>> AP.proof 4
True
>>> AP.proof 5
False

list :: Int -> Lst Source #

show all (antiprimes, size) below a number

>>> import qualified AntiPrimes as AP
>>> AP.list 12
[(1,1),(2,2),(4,3),(6,4)]