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