tests for forprimes and iterator