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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Check if a given number is Pronic | Efficient Approach
- Sum of the first N Pronic Numbers
- Rectangular (or Pronic) Numbers
- Check if a number is divisible by all prime divisors of another number
- Check if a large number is divisible by a number which is a power of 2
- Check whether all the rotations of a given number is greater than or equal to the given number or not
- Check if a number with even number of digits is palindrome or not
- Program to check whether a number is Proth number or not
- Check if the number is a Prime power number
- Check if a number is Flavius Number
- Check if a number ends with another number or not
- Check Whether a number is Duck Number or not
- Check if given number is Emirp Number or not
- Check whether a given number N is a Nude Number or not
- Check whether given number N is a Moran Number or not
- Check if a given number is factorial of any number
- How to check if a given number is Fibonacci number?
- Check whether a number is Non-hypotenuse number
- Check if a number is Triperfect Number
- Check if a number is a power of another number
Improved By : jit_t