# Probability of a number being a multiple of another number

For a random whole number, n, between 0 and 4000 billion (don't know what that's called), is the probability that n is a multiple of 4096, 1/4096?

-
It sounds suspiciously specific but it's not homework, promise. It's a filesize checking thing. – Jayraj Jul 11 '12 at 20:07
Almost exactly $1/4096$. Is it $0$ to $4000$ billion inclusive (both ends), or exclusive? And is it US billion or British billion? The answers to the above questions make no practical difference to the answer. – André Nicolas Jul 11 '12 at 20:33
Didn't know US and British billions were different. If it matters it's 4,000,000,000 x 1000. And 0 and 4000 billion both inclusive. – Jayraj Jul 11 '12 at 20:36
Traditionally, a British billion is $10^{12}$, not $10^9$. Most of my British contacts, which are not many, are using $10^9$ – Ross Millikan Jul 11 '12 at 20:38
@Jayraj If it is for a practical application, can you be certain that your $n$ is really a random whole number? For instance, executable filesizes (and a few other formats) are frequently divisible by large powers of two, far more often than any random number. – Erick Wong Jul 12 '12 at 6:42

If one end (either $0$ or $4000$ billion) is included, the probability is exactly $\frac 1{4096}$ as $4096=2^{12}$ and 4000 billion has at least $14$ factors of $2$ (if billion = $10^9$). If both ends are excluded, there is an error of $1$ in $4000$ billion. If both ends are included, there is an error of about $1$ in $976562500$
Added: as both ends are included, the probability is $\frac {976562501}{4000000000001}$ which is not exactly $\frac 1{4096}$