Dear Marco, > Suggestions for the interface? mpz_prime_t p; mpz_prime_init_ui (p, 17); /* initializes p to 17 */ mpz_prime_next (p); /* p <- next_prime(p) */ mpz_prime_clear (p); We could access the current prime by: mpz_prime_get_z (z, p); Paul