Icosidigonal number | Function to calculate Icosidigonal number ; Formula for finding nth Icosidigonal number ; Driver function
function icosidigonal_num ( n ) { return parseInt ( ( 20 * n * n - 18 * n ) / 2 ) ; } let n = 4 ; document . write ( n + " " + icosidigonal_num ( n ) ) ; document . write ( " " ) ; n = 8 ; document . write ( n + " " + icosidigonal_num ( n ) ) ;