Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (7 sloc) 175 Bytes
corners :: Int -> Int
corners n = (4 * oddSquare) - (6 * even)
where
oddSquare = n^2
even = n-1
euler28 :: Int -> Int
euler28 size = 1 + (sum $ map corners [3,5..size])