Digital root
calculate
A digital root is also this: where N is a given number: DigitalRoot in base b (N) = [b-1 if N=0] else [N mod (b-1)]