Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- pentagonalPowerSeries :: [Integer]
- numPartitions :: [Integer]
- partitionsInc :: Integral a => a -> a -> [[a]]
- partitionsDec :: Integral a => a -> a -> [[a]]
- allPartitionsInc :: [[[[Int]]]]
- propInfProdLinearFactors :: Int -> Bool
- propPentagonalPowerSeries :: Int -> Bool
- propPentagonalsDifP :: Int -> Bool
- propPentagonalsDifN :: Int -> Bool
Documentation
pentagonalPowerSeries :: [Integer] Source #
This is a very efficient implementation of prodLinearFactors
.
numPartitions :: [Integer] Source #
partitionsInc :: Integral a => a -> a -> [[a]] Source #
Give all partitions of the natural number n with summands which are at least k. Not quite correct for k>n.
partitionsDec :: Integral a => a -> a -> [[a]] Source #
allPartitionsInc :: [[[[Int]]]] Source #
type Int is needed because of list node indexing
QC.forAll (QC.choose (1,10)) $ \k -> QC.forAll (QC.choose (0,50)) $ \n -> Parts.partitionsInc k n == Parts.allPartitionsInc !! k !! n
equating (take 30) (map genericLength (Parts.allPartitionsInc !! 1)) Parts.numPartitions
propInfProdLinearFactors :: Int -> Bool Source #
QC.forAll (QC.choose (0,100)) Parts.propInfProdLinearFactors
propPentagonalPowerSeries :: Int -> Bool Source #
Parts.propPentagonalPowerSeries 1000
propPentagonalsDifP :: Int -> Bool Source #
Parts.propPentagonalsDifP 10000
propPentagonalsDifN :: Int -> Bool Source #
Parts.propPentagonalsDifN 10000