Updated to generate variable number of offset primes and to use stdint.h for uint64_t.