Dear All,(adsbygoogle = window.adsbygoogle || []).push({});

I have to test if a binary number is divisible to

2^n - 1 where n is even.

Is there a test available for binary numbers like to test a divisibility by 3.

Thanks in advance...

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Binary 2^n - 1 divisibility

**Physics Forums | Science Articles, Homework Help, Discussion**