### Kaprekar Number

As stated in Wikipedia, "in mathematics, a non-negative integer is called a "Kaprekar number" for a given base if the representation of its square in that base can be split into two parts that add up to the original number, with the proviso that the part formed from the low-order digits of the square must be non-zero—although it is allowed to include leading zeroes."

\(55\) is a Kaprekar number because if we do \(55^2 = 3025\) and split \(3025\) into \(30, 25\) and sum the two parts it turns out to be \(55\) itself.

Code:

Related posts:

Split an IntegerCount the number of digits in an integerCompute the power of a number in O(log n) time

If you've found any errors or want to give a feedback then comment below.

References: https://en.wikipedia.org/wiki/Kaprekar_number

\(55\) is a Kaprekar number because if we do \(55^2 = 3025\) and split \(3025\) into \(30, 25\) and sum the two parts it turns out to be \(55\) itself.

Code:

Related posts:

Split an IntegerCount the number of digits in an integerCompute the power of a number in O(log n) time

If you've found any errors or want to give a feedback then comment below.

References: https://en.wikipedia.org/wiki/Kaprekar_number