Skip to main content

Posts

Most Recent Post

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

Latest Posts

Split an integer

Count the number of digits in an integer

Compute the power of a number in O(log n) time

How to find remainder without % operator?

What is a pangram?

Learning Java

Beautify your Linux Terminal

What would it be like to communicate with animals?

On Shashi Tharoor and his session at Kolkata Literature Festival 2018

Muhammad Yunus's session at Tata Steel Kolkata Literary Meet 2018