Given a number n, find the nth Pentatope number. A pentatope number is represented by the fifth number in any row of Pascal’s Triangle. As it is fifth number, it should start from row having at least 5 numbers. So, it starts from row 1 4 6 4 1. The formula for the nth pentatopic number is: n (n+1) (n+2) (n+3) / 24
Starting Pentatope numbers are : 1, 5, 15, 35, 70, 126, 210, 330, 495…..
In the above figure, red color circled numbers are pentatope numbers.
Input : 4 Output : 35 Input : 8 Output : 330
Below is the implementation for nth Pentatope Number :
7th Pentatope number : 210 12th Pentatope number : 1365
References : https://en.wikipedia.org/wiki/Pentatope_number/
- Pentatope number
- Program to print pentatope numbers upto Nth term
- Count number of triplets with product equal to given number with duplicates allowed
- Count number of trailing zeros in Binary representation of a number using Bitset
- Find minimum number to be divided to make a number a perfect square
- Largest number dividing maximum number of elements in the array
- Number of times the largest perfect square number can be subtracted from N
- Number of possible permutations when absolute difference between number of elements to the right and left are given
- Given number of matches played, find number of teams in tournament
- Number of ways to split a binary number such that every part is divisible by 2
- Find the number of positive integers less than or equal to N that have an odd number of digits
- Smallest number dividing minimum number of elements in the array | Set 2
- Smallest number dividing minimum number of elements in the Array
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
- Print a number strictly less than a given number such that all its digits are distinct.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.