I'm new to number theory, however, I wanted to do a course in cryptography that requires me to have understood a decent amount of number theory.
I started watching a course on Coursera. I did not understand the part where the professor explains the generic algorithm for finding if a number of any base, is divisible by another.
Here is the link to the lecture: Modular arithmetic. He starts explaining at around 12 minutes into the video.
I have copied a description of the algorithm as given in the slides:-
x = 5432 = ( ( (0 + 5)·10 + 4 )·10 + 3 )·10 + 2
Can perform mod reductions as desired.
If divisor ≤ base, reduce digits and base first
Powerful general algorithm
Easily implemented in a program
Space efficient: Largest sum < base·divisor
Time efficient: O(log(v))
Base/divisor-specific algorithms can be faster
I don't understand what is the "powerful general algorithm" that he describes, to find divisibility of any number of any arbitrary base by another number. Could some one please help me understand what the algorithm is ? how does it achieve the space and time efficiency that he claims ?
I'm sorry for the bad references. I tried finding the algorithm on the internet but I could not find any references.