Number Theory with Finite State MachinesComputer Science Level pending
Clarification: Empty string is considered as equivalent to 0 in this question.
Extra Credit: Both this FSM and the one in Agnishom Chattopadhyay's question (linked below) has three states. But the answers are different. Account for this phenomenon.
Inspiration: Lexical Number Theory