Zumkeller numbers are the set of numbers whose divisors can be partitioned into two disjoint sets that sum to the same value. The first few zumkeller numbers are 6, 12, 20, 24, 28, 30, 40, 42, 48, 54, ….
In this article, we will find the Nth Zumkeller number.
Find the Nth Zumkeller Number: Given a number N, the task is to find the Nth Zumkeller number.
Input: N = 2
The second Zumkeller number is 12.
Input: N = 5
Approach: The following steps are followed to compute the answer.
- Get the number N.
- Iterate over the loop starting from i = 1 until Nth Zumkeller number is found.
- Check the number ‘i’ is a zumkeller number or not.
- If yes, then repeat the above step for i+1 and increment the counter.
- If no, then repeat the above step for i+1 without incrementing the counter.
- Finally, when the counter is equal to the number N, that number is the N-th zumkeller number. Print the value of ‘i’ and break the loop.
Below is the implementation of the above approach:
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.
- Nth term where K+1th term is product of Kth term with difference of max and min digit of Kth term
- Find the Nth term of the series where each term f[i] = f[i - 1] - f[i - 2]
- Find Nth term of the series where each term differs by 6 and 2 alternately
- Nth term of a sequence formed by sum of current term with product of its largest and smallest digit
- Nth term of given recurrence relation having each term equal to the product of previous K terms
- Program to print tetrahedral numbers upto Nth term
- Program to print pentatope numbers upto Nth term
- Program to find Nth term in the given Series
- Find nth term of the Dragon Curve Sequence
- Program to find the Nth term of the series 3, 7, 13, 21, 31.....
- Program to find Nth term of series 1, 3, 12, 60, 360…
- Program to find the Nth term of series -1, 2, 11, 26, 47......
- Program to find Nth term in the series 0, 0, 2, 1, 4, 2, 6, 3, 8,...
- Program to find Nth term of series 9, 23, 45, 75, 113...
- Program to find Nth term in the series 0, 2, 1, 3, 1, 5, 2, 7, 3,…
- Find Nth term of the series 5, 13, 25, 41, 61...
- Program to find the Nth term of the series 3, 20, 63, 144, 230, ……
- Program to find the Nth term of series 5, 10, 17, 26, 37, 50, 65, 82, ...
- Program to find the Nth term of series 0, 4, 14, 30, 51, 80, 114, 154, 200, ...
- Find Nth term of the series 3, 14, 39, 84...
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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.