This reminds me of something I enjoyed writing a couple of years ago. I’d decided to use the Damm checksum algorithm[1] for order numbers at work. Every implementation that I could find was turning the number into a string than then check summing it one character at a time. And that approach felt rather suboptimal. So, I decided to write a numeric implementation[2].
[1]: https://en.m.wikipedia.org/wiki/Damm_algorithm
[2]: https://github.com/jeethu/damm