Let's say we have an integer x. How should I delineate a summation of its' digits until I get a single digit.
For example:
x = 12345 1 + 2 + 3 + 4 + 5 = 15 1 + 5 = 6
I believe it is possible, just can't find a mathematical way to do so. Would be glad if anyone shared their ideas or point me to the right direction.