Pentatope number | Java Program to find the nth Pentatope number ; function for Pentatope number ; formula for find Pentatope nth term ; Driver Code
import java . io . * ; class GFG { static int Pentatope_number ( int n ) { return n * ( n + 1 ) * ( n + 2 ) * ( n + 3 ) / 24 ; } public static void main ( String [ ] args ) { int n = 7 ; System . out . println ( n + " th ▁ " + " Pentatope ▁ number ▁ : " + Pentatope_number ( n ) ) ; n = 12 ; System . out . println ( n + " th ▁ " + " Pentatope ▁ number ▁ : " + Pentatope_number ( n ) ) ; } }