TITLE: Proof of the divisibility rule of 17.
QUESTION [13 upvotes]: Rule: Subtract 5 times the last digit from the rest of the number, if the 
      result is divisible by 17 then the number is also divisible by 17.

How does this rule work? Please give the proof.

REPLY [2 votes]: Write the original number as 10x+y to separate out the last digit (y) from the number without the last digit (x).  Recognize that divisibility by a 17 means you can write the number as 17n for a positive integer n.  So our statement is if x-5y=17n then 10x + y = 17m, where x,y,m,n are positive integers.
Assume x - 5y = 17n.  Now we try to get the left-hand side to look like our original number.  First multiply both sides by 10. (10x - 50y = 170n), and then add 51y to both sides.  (10x+ y = 170n + 51y).  Factor 17 from the right hand side.  (10x+y=17(10n+3y)).  Recognize that 10n+3y is a positive integer as n and y are integers, let's define it as m, proving that 10x+y=17m meaning that the original number is divisible by 17 if x-5y was divisible by 17.