Iterator based version for the simple Pell solver.