
David W. answered 01/05/20
Experienced Prof
N is divisible by 7 if subtracting twice the last digit of N from the remaining digits gives a multiple of 7 (e.g. 658 is divisible by 7 because 65 - 2 x 8 = 49, which is a multiple of 7.
= = = = =
Prove that when a number is divisible by 7, the result when subtracting twice the last digit from the number formed by the remaining digits is a multiple of 7.
Let the number be N=10a+b, where b is the last digit of N and a is the number formed by the remaining digits.
Now we have to prove that if a−2b is divisible by 7, then N=10a+b must be also divisible by 7.
Let a−2b=7k, where k is an integer, and multiply this equation by 10 and add b to both sides. Then you'll get
10a−20b+b=70k+b.
Now move −20b to the right, and you'll get
10a+b=N=70k+21b,
which is a multiple of 7
= = =
Note to tutor Stanton D.: [ see the RSA Problem article on Wikipedia. ] "RSA public key requires that N be a large semiprime (i.e., a product of two large prime numbers)..." To divide key N by primes less than SQRT(N) ... sounds simple.

Stanton D.
OK, you reduced the division by 7 check test to one multiplication, one subtraction, and a division by 7 of a number one digit size less than the original number. Probably less time intensive than my log(N)-multiple multiplications (in parallel time), a group addition, and a division by 7 of a number much smaller than the original one. But, still not much better than just dividing the original number by 7, I think? Sorry about the implication that cryptography requires intensive calculations. I've just never had much success factoring an RSA public key value, with or without math. When I get my quantum computer, though....01/06/20