Program to check if N is a Tridecagonal Number or not | Function to check that the number is a Tridecagon number ; Condition to check if the number is a Tridecagon number ; Driver Code ; Function call
function isTridecagon ( N ) { var n = ( 9 + Math . sqrt ( 88 * N + 81 ) ) / 22 ; return ( n - parseInt ( n ) ) == 0 ; } var i = 13 ; if ( isTridecagon ( i ) ) { document . write ( " " ) ; } else { document . write ( " " ) ; }