Centered heptagonal number | Function to find Centered heptagonal number ; Formula to calculate nth Centered heptagonal number ; Driver Code
function centered_heptagonal_num ( n ) { return parseInt ( ( 7 * n * n - 7 * n + 2 ) / 2 ) ; } let n = 5 ; document . write ( n + " " ) ; document . write ( centered_heptagonal_num ( n ) ) ;