to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i

Unexpectedly Intriguing!

December 13, 2019

Can you quickly tell if a number is divisible by any of the numbers from 1 to 12 without actually doing the division?

Let's say you have the number 1,512 and it be really helpful if you could determine if it could be evenly divided by any of the numbers from 1 to 12. Could you do it without launching the calculator app on your mobile phone and performing the divisions?

You can, but you'll need to apply the divisibility rules you might have learned a long time ago in school. In case you don't remember them, here they are, where we've included one or two you may never have seen before. Try them with 1,512 and see which apply....

- This is the easiest divisibility test of all, because all whole numbers are divisible by 1.
- Look at the last digit of your number of interest. If it is even (equal to 0, 2, 4, 6, or 8), then your number of interest is divisible by 2.
- Add up all the individual digits of your number of interest. If the sum is divisible by 3, so is your number of interest. And if you can't tell right away, repeat this process with the digits of your sum!
- Look at the last two digits of your number of interest. If those two digits are a multiple of 4, your whole number will be evenly divided by 4.
- Look at the last digit of the number of interest. If that digit is either 0 or 5, your number will be divisible by 5.
- You'll need to perform a two-part test to determine if your number is divisible by 6. Specifically, you'll need to perform the divisibility tests for both 2 and 3 on it, where if it passes both tests, then it may be evenly divided by 6.
- This is the hardest of the divisibility tests. Split off the right-most digit of your number of interest from the rest of it, and multiply it by 5. Then add the result to the remaining left-side of your number. If the result is a multiple of 7, your original number will be evenly divisible by 7. If you can't tell right away, repeat this process with your result until you can.
- Telling if your number can be evenly divided by 8 requires a two-part test. First, do the divisibility test for 4, where if it passes, identify the factor by which you have to multiply by 4 to get the last two digits of your number. Then look at the digit in the hundreds place (the third digit from the right) of your number of interest. If both of these values are even, or if both of these values are odd, then your number will be wholly divisible by 8.
- Nine is a multiple of 3, so the divisibility test is a lot like that one. Add up all the individual digits of your number of interest and if the sum is divisible by 9, so is your number of interest. If you can't tell right away, repeat this process with the digits of your sum until you can.
- This may be the second easiest of the divisibility tests. Look at the last digit of your number. If it is 0, then your number will be evenly divided by 10.
- This is a fun one. Starting with the left-most digit of your number of interest, alternate subtracting and adding the individual digits as you go from left to right. When you reach the end of the number, if your final result is a multiple of 11, the original number will be divisible by 11.
- Another two-part test. Because 12 is a multiple of 3 and 4, if your number passes both of the divisibility tests for these two smaller numbers, then it will be evenly divisible by 12.

The divisibility rule for 7 is an example of the right-trim method, which may be applied in performing divisibility tests for larger values, provided you know what to multiply the right-most digit of your test number by in applying that process. In the case of 7, you can also apply it by multiplying the right-most digit of your number by 2 and subtracting that result from the remaining left-side of your number - there's more than one way you can make it work to find out if your test number is divisible by 7.

Going back to the number 1,512, hopefully, you found that it is divisible by 1, 2, 3, 4, 6, 7, 8, 9, and 12. If you're looking for a challenge, try 5,856,519,049,581,039. And if you are looking for more divisibility rules for larger numbers, keep reading....

Now, what about divisibility rules for numbers bigger than 12? For most of these numbers, the right trim method provides a relatively simple and effective means to determine if these numbers can evenly divide into your number of interest. Provided you know what multiplier to apply in using it.

At the same time, you may also recognize from the rules we presented for divisors from 1 to 12 that you don't get a whole lot of extra mileage in having divisibility rules for conjugate numbers, or rather, those values that are already the products of two or more smaller factors. For example, you can simply perform the tests for 2 and 7 to determine if a number is wholly divisible by 14. Or you could perform the tests for 3 and 11 to determine if your number is divisible by 33.

From a practical perspective then, if you're trying to tell if a given value is divisible by a smaller number, you only need to apply the divisibility rules that apply for prime numbers, which you can combine together as you might need to conduct divisibility tests for non-prime number divisors.

That brings us to the following tool, which we've constructed to identify the multiplier that you would need to successfully apply the single digit right trim method with your number of interest. Just enter the prime number for which you want to identify a multiplier, and it will provide you the number you need.

Technically, the tool above will work to identify valid right trim method multipliers for any value you enter whose final digit is 1, 3, 7 or 9, which coincidentally happens to include all prime numbers greater than 5. Speaking of which, here are lists of the first fifty million prime numbers, which should keep you busy for a while for your divisibility tests!

**Image credit**: Gayatri Malhotra

About Political Calculations

Welcome to the **blogosphere's toolchest**! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:

ironman at politicalcalculations.com

Thanks in advance!

Recent Posts

Stock Charts and News

Most Popular Posts

Quick Index

Site Data

This site is primarily powered by:

The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.

Market Links

Useful Election Data

Charities We Support

Shopping Guides

Recommended Reading

Recently Shopped

Archives

Legal Disclaimer

Materials on this website are published by Political Calculations to provide visitors with free information and insights regarding the incentives created by the laws and policies described. However, this website is not designed for the purpose of providing legal, medical or financial advice to individuals. Visitors should not rely upon information on this website as a substitute for personal legal, medical or financial advice. While we make every effort to provide accurate website information, laws can change and inaccuracies happen despite our best efforts. If you have an individual problem, you should seek advice from a licensed professional in your state, i.e., by a competent authority with specialized knowledge who can apply it to the particular circumstances of your case.