Number divisible by 2,4,8,16../5,25,125..

For any number 2^n(or 5^n), if you need to find out if it is a factor of number X, it is enough if you check the last n digits of the number X.

For ex., say a number 120016, if I need to find if the number is divisible by 16(=2^4), I just need to check if the last 4 digits is divisible by 4. So here 120016 is divisible by 16, because the last 4 digit is divisible by 16.

Now, let’s not convinced just with some shortcut.

Let’s understand the concept by taking a 5 digit number represented by  abcde, where a,b,c,d,e each represents some decimal from 0 to 9.

I need to find out if the number abcde is divisible by 8(=2^3).

Expressing the number abcde as ab000 +cde

So now, ab000 is nothing but abX1000, no doubt this is divisible by 8.

Now we just need to confirm if the number cde is divisible by 8. That’s it for any number X , to confirm if it is divisible by 2^n we just need to check if the last n digits is divisible by n.

The similar way we can prove for powers of 5..

Advertisements

Author: kannan_r

Just one among million. Software Engineer by profession. A bit interested in Math and Computing. Sometimes feeling that my interests are worth to be recorded and shared. This is just an initiative for my sharing;-)

1 thought on “Number divisible by 2,4,8,16../5,25,125..”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s