I ran across this divisibility test for 7 in an old pre-algebra textbook. After figuring out how it works, I was able to generalize it. Since then, I've seen some other discussions of the generalization on the web, but it deserves to be better known, I think. The version for 11 is especially easy, but few people seem to know it.

The test for 7 goes like this (using 37499 as the number to be tested):

- Break off the last digit from the rest of the number to create two numbers: 3749 and 9
- Double the broken off last digit, and subtract that from the other new number: 3749-18=3731
- If the result is divisible by 7, then the original number is. Of course, you can test the result using the same procedure: the numbers are 373 and 1, so 373-2=371 .... and again: 37-2=35, which is clearly divisble by 7, so the original number was.

It works like this: the first of the two numbers created by breaking off the last digit (3749 in the example) is effectively the number in the tens column, so call it *t*, and call the units digit *u*. So the original number is 10*t*+*u*. The number created in step 2 is *t*-2*u*. So the claim is that 7|(*t*-2*u*) implies 7|(10*t*+*u*). I'm using the vertical bar to mean "divides".

Noting that multiplying a number by a non-multiple of 7 doesn't change divisibility by 7, nor does adding multiples of 7, we get:

7|(*t*-2*u*) iff

7|10(*t*-2*u*) = 10*t*-20*u* iff

7|10*t*-20*u*+21*u* = 10*t*+*u* which was what we wanted.

The reason you need a 2 in the process is that you need to add a multiple of 7 with a final digit of 1 in the last step of the proof. Since that multiple is 21, you need to multiply by 2 (it's fairly obvious if you follow the 2 through the proof). The generalization uses the same pattern for other primes with multiples ending in 1 whose first digits are manageable:

For 7, the multiple is 21, so you multiply the final digit by 2 and subtract.

For 11, the multiple is 11, so you multiply the final digit by 1 and subtract (easy!!).

For 17, the multiple is 51, so you multiply the final digit by 5 and subtract.

You can also repeat the proof with addition and subtraction reversed, requiring multiples with a final digit of 9 (and using the next higher first digit to multiply--repeating the proof makes it clear why):

For 13, the multiple is 39, so you multiply the final digit by 4 and add.

For 19, the multiple is 19, so you multiply the final digit by 2 and add.

For 29, the multiple is 29, so you multiply the final digit by 3 and add.

Other tests are possible, but the arithmetic gets unwieldy. In these tests, with a paper and pencil to keep track of successive steps, the calculations are almost immediate, especially for 11:

testing 351,718:

351,718 (35171-8)

35,163 (3516-3)

3513 (351-3)

348 (34-8)

26....not divisible.

Ever since I've found this, I've been preaching the gospel of easy divisibility tests for awkward primes.

Very cool. The 11 test is actually a bit simpler than the version I knew (take the sum of every other digit and subtract the sum of the remaining digits and if that number is divisible by 11 then you're done.

Posted by: Vito Prosciutto | August 05, 2005 at 12:12 PM

Nice generalization. Very nice work.

Posted by: J.D. Fisher | August 05, 2005 at 02:37 PM

Another quick divisibility test for 11:

Any palindromic number (i.e. a number that's written the same forwards or backwards, like 2112 or 12344321) which has an even number of digits is divisible by 11.

The converse isn't true, of course.

Posted by: Geoff | November 08, 2005 at 05:05 PM

thanks for the divisiblity of 7 been tryin to find it =)

Posted by: Cedric | March 12, 2006 at 02:56 AM

hmm, I don't know if you look this far back in your archives. Your divisibility test for 7 is clunky for longer numbers.

Try this instead:

break the number into groups of three digits (breaks go where the commas go). Add the even groups, subtract the odd ones (or vice versa). If the result is divisible by 7, so is the number.

eg: 82,342,509,668

509 + 82 = 591

748 + 668 =1416

1416 - 591 = 825

Now is 825 divisible by 7? Apply your test, which is new to me: 82 - 2(5) = 72. Nope

Posted by: Jonathan | June 18, 2006 at 06:24 AM

Oh, and the same test works for 13.

(why? because 1001 = 7*11*13)

Posted by: Jonathan | June 18, 2006 at 06:24 AM

If you tests for 11 are true, it would make both 777 AND 767 divisible by 11. Me no thinkee so.

Posted by: Nici | February 06, 2007 at 08:17 PM

Nici: i don't think your examples disprove my test.

for 777:

77 - 14 = 63, which is divisible by 7.

for 767:

76 - 14 = 62, which isn't.

Posted by: Polymath | February 07, 2007 at 03:48 PM

heyy lol i fink its wierd 2 bcuz i red da comment n its false

767 dont work m8 dus it lol

rite listen, wot it is yeh, is cuz...767 take 7 x2 and yh we so u got 76 - 14 well dat makes 62 n it dont work !!! ur fake m8 i neeed da real answer ne1 got ne help ?

Posted by: danielle | March 02, 2007 at 09:42 AM

Umm danielle I hope to god you are joking because you just proved yourself an atard by contradiction... If the answer you get is right you must be wrong? wtf. Oh btw Carlos Mencia just nominated you for DEE DEE DEE of the year congrats!

Posted by: Dumbassatic poker | April 19, 2007 at 02:45 PM

yepz whateva

Posted by: hd | April 24, 2007 at 07:36 PM

I want to get the knowledge about the number divisible by 13.

Posted by: Nabi Bux Abro | August 07, 2007 at 05:59 AM

i am a student strugling on a question the question is when 823519 is divided by a number which is bigger than one the remainder is three times the remainder obtained by dividing 274658 by the same number find the divisor?

Posted by: peter | August 21, 2007 at 05:03 AM

most easy test

Posted by: mukesh | October 24, 2007 at 12:14 AM

in answer to Nabi Bux Abro's question:

1} 823519 = Ax + 3R

2} 274658 = Cx + R

A, C, R, x are integer unknowns, and 'x' is the divisor that you're looking for.

Subtract 3 times {2} from {1} to get

455 = (A-3C)x +3R - 3R

or

5*91 = (A-3C)x.

'x' is either 5 or 91. 5 does not work. 91 does, since 823519/91 has remainder 60, and 274658/91 has remainder 20.

Posted by: andrew | January 19, 2008 at 07:42 PM

You stupid ham prosciutto, it's the same test, c-(b-a)=c-b+a!

Posted by: Joe Salami | September 03, 2008 at 06:41 PM

The divisibility test of 7 is good & cool.

Posted by: rahul | October 05, 2009 at 10:08 AM

it is very intelligent work.

Posted by: toni,bit sindri,barhiya | October 06, 2009 at 12:36 AM

I ran this divisibility test by myself and get the same results. It's amazing!

Posted by: emergency response | July 22, 2010 at 06:36 AM

Check out my web page:

http://www.madteddy.com/divisibl.htm

where I present a document which explains how it is possible to generate divisibilty tests for any divisor ending in 1, 3, 7, or 9 (i.e. relatively prime to 10). Starting from the "break off the last digit, double it, and subtract" test for 7, I've presented a table for every number of this type up to 109. It would be a straightforward matter to extend it as far as you like.

(Note that the usual tests for 3, 9, and 11 are actually examples of this type of test, thinly disguised.)

Posted by: Mad Teddy | February 05, 2011 at 07:19 PM

I must say congrats to whoever figured out the divisibility test of 7.Just for the record i did it when i was 16.No offense.

Posted by: Daniel Ngila | April 06, 2011 at 10:41 AM

too hard !!!!!!!

Posted by: Emma | June 09, 2011 at 03:33 PM

great!! it helps a lot to math majors students

Posted by: greta gonzales | November 16, 2011 at 12:24 AM