Tetracontadigonal Number | Java implementation for the above approach ; Function to find the nth Tetracontadigonal Number ; Driver Code
import java . util . * ; class GFG { static int TetracontadigonalNum ( int n ) { return ( 40 * n * n - 38 * n ) / 2 ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . print ( TetracontadigonalNum ( n ) ) ; } }