A General Framework for Kaprekar Dynamics on n-Digit Integers | Synapse