finally 129 done

have taken too many wrong turns before realizing how it works :)

mod distributes over sums so that 1 + 10 + 100 ... can be modded
consecutive.

further more A(n) <= n because (in short) 'rings'

worst case A(3^x) = 3^x
A(p) = (p-1) / k, where p is prime

you can safely start at 999999 and then it's easy