c') : accumulate acc' ls 
    where acc' = acc + (min a (d-1)) - (div (d-1) 2)

euler n =  head $ dropWhile (\(a,
accumulate acc ((a, d):ls) = (a, acc') : accumulate acc' ls 
    where acc' = acc + (min a (d-1)) - (div (d-1) 2)
accumulate acc ((a, d):ls) = (a, acc') : accumulate acc' ls 
    where acc' = acc + (min a (d-1)) - (div (d-1) 2)