Anda di halaman 1dari 2

TYPES OF NUMBERS (PROGRAMMING)

1. DUCK NUMBER -A Duck number is a number which has zeroes present in it, but there should be no
zero present in the beginning of the number. For example 3210, 7056, 8430709 are all duck
numbers whereas 08237, 04309 are not.
2. NEON NUMBER- A neon number is that where sum of digits of square of the number is equal
to the number.
For example if the input number is 9, it's square is 9*9 = 81 and sum of the digits is 9. 9 is
a neon number
3. ARMSTRONG NUMBER- An Armstrong number of three digits is an integer such that the sum of the cubes of its
digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
4. AUTOMORPHIC NUMBER -In mathematics an automorphic number (sometimes referred to as a
circular number) is a number whose square "ends" in the same digits as the number itself. For
example, 52 = 25, 62 = 36, 762 = 5776, and 8906252 = 793212890625, so 5, 6, 76 and 890625 are
all automorphic numbers.
5. MAGIC NUMBER-A Magic number is a number whose sum of digits eventually leads to 1.
Example#1: 19 ; 1+9 =10 ; 1+0 = 1. Hence a magic number.
Example#2: 226; 2+2+6=10; 1+0 =1. Hence a magic number.
Example#3: 874; 8+7+4=19; 1+9=10; 1+0=1. Hence a magic number.
6. UNIQUE NUMBER-A Unique number is a positive integer (without leading zeros) with no duplicate
digits. For example 7, 135, 214 are all unique numbers whereas 33, 3121, 300 are not.
7. BUZZ NUMBER-A number that ends with 7 or is divisible by 7 is called buzz number.
8. PALINDROME NUMBER-palindrome number is a number that remains the same when its digits
are reversed. Like 16461.
9. HAPPY NUMBER-A happy number is a number in which the eventual sum of the square of the digits
of the number is equal to 1.
Example:

10. PRIME NUMBER- A prime number has only two factors, namely one and itself.
11. PERFECT NUMBER- A perfect number is a positive integer that is equal to the sum of its proper positive
divisors, that is, the sum of its positive divisors excluding the number itself.
12. PALINDROME PRIME- A prime palindrome integer is a positive integer (without leading zeros) which
is prime as well as a palindrome
13. COMPOSITE NUMBER- Here we need to find composite number which is defined as a number which has a
positive number has divisor other than 1 and itself…In a simple way we can define a composite number
has a number which is not prime number
14. HCF-
15. LCM
16. TWIN PRIME- Twin Prime numbers are a pair of numbers which are both prime and their difference
is 2.
(3,5) (5,7) (11,13) (17,19) (29,31) (41,43) (59,61) (71,73)
17. TWISTED PRIME- If a number is prime, and its reverse number is also prime, then it is twisted prime.
e.g- 37 is prime, and its reverse order, 73, is also prime.
18. PYTHAGOREAN TRIPLET- A Pythagorean triplet is a set of three natural numbers, a, b and
c, for which a2 + b2 = c2.
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for which a + b + c = 1000.

19. ISBN NUMBER- An ISBN (International Standard Book Number) is a ten digit code which uniquely
identifies a book.
The first nine digits represent the Group, Publisher and Title of the book and the last digit is used to check
whether ISBN is correct or not.
Each of the first nine digits of the code can take a value between 0 and 9. Sometimes it is necessary to make
the last digit equal to ten; this is done by writing the last digit of the code as X.
To verify an ISBN, calculate 10 times the first digit, plus 9 times the second digit, plus 8 times the third and so
on until we add 1 time the last digit. If the final number leaves no remainder when divided by 11, the code is a
valid ISBN.
For Example:
1. 0201103311 = 10*0 + 9*2 + 8*0 + 7*1 + 6*1 + 5*0 + 4*3 + 3*3 + 2*1 + 1*1 = 55
Since 55 leaves no remainder when divided by 11, hence it is a valid ISBN.
2. 007462542X = 10*0 + 9*0 + 8*7 + 7*4 + 6*6 + 5*2 + 4*5 + 3*4 + 2*2 + 1*10 = 176
Since 176 leaves no remainder when divided by 11, hence it is a valid ISBN.
3. 0112112425 = 10*0 + 9*1 + 8*1 + 7*2 + 6*1 + 5*1 + 4*1 + 3*4 + 2*2 + 1*5 = 71
Since 71 leave no remainder when divided by 11, hence it is not a valid ISBN.
20. Special Number-The class SpecialNumber checks if the sum of the factorial of the digits of the Number is Equal to
the number itself. This is termed to be a Special Number. For Example 2= 2! =2.
145 = 1! + 4! + 5! = 1+24+120 = 145.

Anda mungkin juga menyukai