Hi, recently i came across a problem where it was required to check if a number is divisible by 7 . Though quiet an elementary task, i think its not very commonly known. This is what i found.
Reverse the number . Mulitply each digit of this reversed number by the digits 1(=1%7),3(=10%7),2(=100%7),6(=1000%7),4(=10000%7),5(=100000%7) consequtively till all digits are covered. Sum the products. If this value is divisible by 7 then the original number is too.
Actually these numbers are the cyclic remainders of division by 7.
Take the last digit of the number and subtract it from the number formed by the remaining digits.If this value is divisible by 7 then the original number is too. We can do it recursively to reduce the number .
Hope that helps.