Centered tridecagonal number | Function to find nth centered tridecagonal number ; Formula to calculate nth centered tridecagonal number ; Driver code
function centeredTridecagonalNum ( n ) { return ( 13 * n * ( n - 1 ) + 2 ) / 2 ; } var n = 3 ; document . write ( centeredTridecagonalNum ( n ) + " " ) ; n = 10 ; document . write ( centeredTridecagonalNum ( n ) ) ;