Pentacontagon number | Java program for above approach ; Finding the nth pentacontagon number ; Driver code
import java . util . * ; class GFG { static int pentacontagonNum ( int n ) { return ( 48 * n * n - 46 * n ) / 2 ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . println ( "3rd ▁ pentacontagon ▁ Number ▁ is ▁ = ▁ " + pentacontagonNum ( n ) ) ; } }