Special Numbers
Special Numbers
Palindrome Number: A palindromic number is a number that remains the same when its digits are
reversed. For Example: 16461
Armstrong Number: It is a positive number if it is equal to the sum of cubes of its digits is called
Armstrong number and if its sum is not equal to the number then it’s not an Armstrong number.
Examples: 153 is Armstrong
(1*1*1)+(5*5*5)+(3*3*3) = 153
Perfect Number: A perfect number is a positive integer that is equal to the sum of its factors,
excluding the number itself. For example, 6 has factors 1, 2 and 3, and 1 + 2 + 3 = 6, so 6 is a perfect
number.
Spy Number: A spy number is a number where the sum of its digits equals the product of its digits.
For example, 1124 is a spy number, the sum of its digits is 1+1+2+4=8 and the product of its digits is
1*1*2*4=8.
Neon Number: A neon number is a number where the sum of digits of square of the number is equal
to the number. For example if the input number is 9, its square is 9*9 = 81 and sum of the digits is
9. So, 9 is a neon number.
Niven Number: A Niven number is a number which is divisible by the sum of its digits. For example:
111 because 1+1+1 = 3 and 111 is divisible by 3.
Automorphic Number: An Automorphic number is a number if the square of the number ends with
the same digits as the original number. For example: 76 = 762 = 5776. So, last two digits are same as
the original number.
Special (Krishnamurthy) Number: A special number is a number whose sum of the factorial of its
digits is equal to the number itself. For example: 145 = 1! + 4! + 5! = 1 + (1x2x3x4) + (1x2x3x4x5) =
145.
Disarium Number: A number is called as Disarium number if the sum of its digits powered with their
respective position is equal to the original number. For example: 135 = 1 1 + 32 + 53 = 135.
Duck Number: A duck number is a number which have at least one zero (0) present in it. For
example: 3204 is a duck number but 3234 is not a duck number.
Magic Number: Magic number is the, if the sum of its digits recursively are calculated till a single
digit if the single digit is 1 then the number is a magic number.
For example: 226 = 2+2+6=10, 1+0 =1. So, 226 is a magic number.
Happy Number: A happy number is a number which eventually reaches 1 when replaced by the sum
of the square of each digit. For example, consider the number 320.
32 + 22 + 02 ⇒ 9 + 4 + 0 = 13
12 + 32 ⇒ 1 + 9 = 10
12 + 02 ⇒ 1 + 0 = 1.