The numbers that can be arranged to form a rectangle are called Rectangular Numbers (also known as Pronic numbers). The first few Pronic numbers are:
0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462 . . . . . .
Pronic number is a number which is the product of two consecutive integers, that is, a number n is a product of x and (x+1). The task is to check and print Pronic Numbers in a range.
Input : 6 Output : Pronic Number Explanation: 6 = 2 * 3 i.e 6 is a product of two consecutive integers 2 and 3. Input :56 Output :Pronic Number Explanation: 56 = 7 * 8 i.e 56 is a product of two consecutive integers 7 and 8. Input : 8 Output : Not a Pronic Number Explanation: 8 = 2 * 4 i.e 8 is a product of 2 and 4 which are not consecutive integers.
0 2 6 12 20 30 42 56 72 90 110 132 156 182
This article is contributed by Nikita Tiwari. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Check if a given number is Pronic | Efficient Approach
- Rectangular (or Pronic) Numbers
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if a number is divisible by all prime divisors of another number
- Program to check whether a number is Proth number or not
- Check if a number with even number of digits is palindrome or not
- Check whether a number is Non-hypotenuse number
- How to check if a given number is Fibonacci number?
- Check Whether a number is Duck Number or not
- Check whether the given number is Euclid Number or not
- Check if a number is a power of another number
- Check if a number is a Mystery Number
- Check if a number is a Krishnamurthy Number or not
- Check if a number is an Achilles number or not
- Check if a number is a Trojan Number
Improved By : jit_t