Quick actions

cmd+k|ctrl+k

Navigation

Languages

Find integer solutions to y^3 == x^2 + 1

Snippet info

Language

Haskell

Visibility

public

Author

tlehman

Created

2016-04-22T18:36:00Z

Updated

2016-04-22T18:53:44Z

-- Find integer solutions to y^3 == x^2 + 1
main = do
  let equation (x,y) = y^3 == x^2 + 1
  let candidates = [(x,y) | x <- [0..1000], y <-[-100..100]]
  let solutions = filter equation candidates
  print solutions
INFO