A number is a Kaprekar number in a given base if the base digits of can be split into two numbers and such that .
For example, 45 in base 10 is a Kaprekar number since 45 2 = 2025 and 20 + 25 = 45. See A006886 for more base 10 Kaprekar numbers.
Preferably and have the same number of digits, but this is not required and in some cases not possible (when is odd). Furthermore, may have padding zeroes that become inconsequential when computing .
For example, 4879 in base 10 might not seem like a Kaprekar number because 4879 2 = 23804641 but 2380 + 4641 = 7021, not 4879. But we see that 238 + 4641 = 4879, so 4879 is a Kaprekar number after all.