We define super digit of an integer x
using the following rules:
- If
x
has only 1 digit, then its super digit isx
. - Otherwise, the super digit of
x
is equal to the super digit of thedigit-sum
ofx
. Here,digit-sum
of a number is defined as the sum of its digits.
For example, super digit of 9875 will be calculated as: