primes_nth callback class