fork(1) download
  1. t = 6 :: Int -- die size
  2.  
  3. e :: [Rational]
  4. e = [1 + 1/fromIntegral t * sum (f . (n-) <$> [1..t]) | n <- [1..]] where f i = if i < 1 then 0 else e !! (i-1)
  5.  
  6. main = sequence_ $ print <$> take 20 ([1..] `zip` e)
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
(1,1 % 1)
(2,7 % 6)
(3,49 % 36)
(4,343 % 216)
(5,2401 % 1296)
(6,16807 % 7776)
(7,117649 % 46656)
(8,776887 % 279936)
(9,5111617 % 1679616)
(10,33495175 % 10077696)
(11,218463217 % 60466176)
(12,1417221463 % 362797056)
(13,9136402849 % 2176782336)
(14,58465788199 % 13060694016)
(15,373014077521 % 78364164096)
(16,2372610939895 % 470184984576)
(17,15045525694465 % 2821109907456)
(18,95126060008903 % 16926659444736)
(19,599760535484593 % 101559956668416)
(20,3772055737069207 % 609359740010496)