Finding numbers that satisfy an equation