icse

Twisted Prime Program in Java

A number is called a twisted prime number if it is a prime number and reverse of this number is also a prime number.

Twin Prime Program in Java

A twin prime is a prime number that is either 2 less or 2 more than another prime number—for example, either member of the twin prime pair (41, 43). In other words, a twin prime is a prime that has a prime gap of two.

Sum of Digits Program in Java

If a number enter 5462 then sum of theses digits 5+4+6+2 = 17.

Spy Number Program in Java

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.

Special Number Program in Java

A number is said to be special number when the sum of factorial of its digits is equal to the number itself. Example- 145 is a Special Number as 1!+4!+5!=145.

Reverse Number Program in Java

If a number=1234, then reverse of number is 4321.

Prime Number Program in Java

A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways of writing it as a product, 1 × 5 or 5 × 1, involve 5 itself.

Perfect Number Program in Java

A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3, and 1 + 2 + 3 = 6, so 6 is a perfect number.

Palindrome Number Program in Java

A palindromic number is a number that remains the same when its digits are reversed. Like 16461, for example,

Niven Number Program in Java

In mathematics, a Niven number (or harshad number) in a given number base is an integer that is divisible by the sum of its digits when written in that base.

1 2 3 4 5 7