Rewrite while clause of list_first_n_primes(n)