internals of armstrong number finding algorithm