How to calculate the probability of a large number to be divisible by a prime number?

49 Views Asked by At

For example, $\frac{23023}{23}=1001, \mod 0$. Let's say I want to encode my book with number $23$ as my pattern that shows the intactness of my book in any new print. I also do not declare this but let's say I also mentioned the number $23$ out of context in my book for curious readers. If someone realise years later that the number of all the letters in my book is divisible by $23$.

How likely s/he can can think of this can occur by chance?

What is the general way of calculating this for any other prime number?

2

There are 2 best solutions below

0
On BEST ANSWER

The natural density of multiples of $n$, whether $n$ is prime or not, is $\frac 1n$. This would be the justification for saying that $\frac 1n$ of all numbers are divisible by $n$.

0
On

If you divide $a$ by $b$, there are $b$ possible values of the remainder. If all of those remainders are equally likely, then there is probability $\frac 1 b$ that the remainder will be zero, i.e. $a$ is divisible by $b$. Whether $b$ is a prime is not relevant.