Centered triangular number | function for Centered Triangular number ; formula for find Centered Triangular number nth term ; For 3 rd Centered Triangular number ; For 12 th Centered Triangular number
function Centered_Triangular_num ( n ) { return ( 3 * n * n + 3 * n + 2 ) / 2 ; } var n = 3 ; document . write ( Centered_Triangular_num ( n ) + " " ) ; n = 12 ; document . write ( Centered_Triangular_num ( n ) + " " ) ;