# Pentatope number

Given a number n, the task is to write a program to find Nth pentatope number. A pentatope number is class of figurative number and can be represented as regular and discrete geometric patterns. In pascal triangle’s the number in the fifth cell of any row starting with 5-th term row 1 4 6 4 1 from right to left or left to right is Pentatope number.

Examples :

Input : 5
Output :70

Input :8
Output :1001

First few Pentatope numbers are:
1, 5, 15, 35, 70, 126, 210, 330, 495, 715, 1001………

Formula for Nth Pentatope number:




## C++

 // C++ Program to find the  // nth Pentatope Number  #include  using namespace std;     // Function that returns nth  // pentatope number  int pentatopeNum(int n)  {      return (n * (n + 1) * (n + 2) * (n + 3)) / 24;  }     // Drivers Code  int main()  {      // For 5th PentaTope Number      int n = 5;      cout << pentatopeNum(n) << endl;         // For 11th PentaTope Number      n = 11;      cout << pentatopeNum(n) << endl;         return 0;  }

## Java

 // Java Program to find the  // nth Pentatope Number  import java.io.*;     class GFG   {         // Function that returns nth  // pentatope number  static int pentatopeNum(int n)  {      return (n * (n + 1) *              (n + 2) * (n + 3)) / 24;  }  // Driver Code  public static void main (String[] args)   {  // For 5th PentaTope Number  int n = 5;  System.out.println(pentatopeNum(n));     // For 11th PentaTope Number  n = 11;  System.out.println(pentatopeNum(n));     }  }     // This code is contributed by m_kit

## Python3

 # Python3 program to find  # nth Pentatope number     # Function to calculate  # Pentatope number  def pentatopeNum(n):         # Formula to calculate nth      # Pentatope number      return (n * (n + 1) *                  (n + 2) *                  (n + 3) // 24)     # Driver Code  n = 5 print(pentatopeNum(n))  n = 11 print(pentatopeNum(n))     # This code is contributed  # by ajit.

## C#

 // C# Program to find the  // nth Pentatope Number  using System;     class GFG   {         // Function that returns  // nth pentatope number  static int pentatopeNum(int n)  {      return (n * (n + 1) *              (n + 2) * (n + 3)) / 24;  }     // Driver Code  static public void Main(String []args)   {         // For 5th PentaTope Number  int n = 5;     Console.WriteLine(pentatopeNum(n));     // For 11th PentaTope Number  n = 11;     Console.WriteLine(pentatopeNum(n));  }  }  // This code is contributed by Arnab Kundu

## PHP

 

Output :

70
1001


My Personal Notes arrow_drop_up