Note: this question can be solved by math experts too.
Today I learnt about FSM, My lecturer said for example if we are given a number in binary (being inserted from its MSB to LSB) we can decide if it's divisible by 7 using 7 states where each state indicates the remaining part.
But:
How can I decide when to move from one state to the other?
My professor said that for General number not always we need N states to decide if it's dividable by N or not, can someone please give me an example of such special case?