input base, power, then n (calculates up to n) for the usual happy numbers, input 10 for base and 2 for power n is capped at 200000 unless you're using turbowarp
https://en.wikipedia.org/wiki/Happy_number#Programming_example