Divisibility by seven (1/3). A number n can be written, in decimal notation, as n=10x+y, where y has one digit and x one digit less than n. Since 5 and 7 are relatively prime, n is divisible by 7 if and only if 5n=50x+5y is.
Divisibility by seven (2/3). 50=49+1=7*7+1, which means that 50 is congruent to 1 modulo 7. This implies that 50x+5y is divisible by 7 if and only if x+5y is. The rule is thus: take 5 times the last digit and add it to the integer formed by the other digits; check whether the sum is divisible by 7.
Divisibility by seven (3/3). Examples. 161->16+5*1=21=3*7, divisible by 7. 1799->179+5*9=224 ->22+5*4=42=6*7, divisible by 7. 94->9+5*4=29=28+1=4*7+1, not divisible by 7.