Skip to content

Instantly share code, notes, and snippets.

@johnmcdonnell
johnmcdonnell / problem44.hs
Created March 18, 2012 19:17
Project Euler Problem 44
import Data.Maybe
import Data.Set as S
import Data.List as L
-- Problem 44
-- Pentagonal item and list definitions.
pentagonal :: Integral a => a -> a
pentagonal n = n*(3*n - 1) `div` 2