A number with different remainders for given set of primes

108 Views Asked by At

How to find a number which gives different remainders on division by given set of prime numbers? e. g. for a set {2, 3, 7}, 17 is a number which gives 3 different remainders 1, 2, 3 when divided by 2, 3, 7 respectively.

1

There are 1 best solutions below

5
On BEST ANSWER

For every set of primes, the product of the primes minus one does the job. The residue modulo every prime $p$ in the set is then $p-1$, hence the remainders are distinct.