Octacontagon Number | Java program for above approach ; Finding the nth octacontagon Number ; Driver Code
import java . util . * ; class GFG { static int octacontagonNum ( int n ) { return ( 78 * n * n - 76 * n ) / 2 ; } public static void main ( String args [ ] ) { int n = 3 ; System . out . print ( "3rd ▁ octacontagon ▁ Number ▁ is ▁ = ▁ " + octacontagonNum ( n ) ) ; } }