[Math] What numbers are relatively-prime to $256?$

cryptographyprime numbers

Given the numbers are in the range $1$ to $256$, which ones AREN'T co-prime, would be an easier question$?$

This question may be very specific and hopefully trivial for somebody on the maths board, but I ask ii because it's potentially relevant to the interest of cryptographers and yet somehow doesn't belong here.

Please don't flame me for asking such an easy question or one that may appear not to be relevant to other's interests… it will be relevant to the interest of people on the crypt o board but at the same time, isn't really a question apt for the crypt o site either.

Explaining the definition of "relatively prime" to $256$, without just linking to here, would be awesome!

Best Answer

A number is relatively prime to $256$ if it does not share any prime factors with $256$. Since $256=2^8$ has only one prime factor, namely $2$, this means a number is relatively prime to $256$ if it is not a multiple of $2$. In other words, if it is odd.

There are $128$ odd numbers between $1$ and $256$: $1,3,5,\ldots,251,253,255$.

Related Question