human
Centered triangular number | function for Centered Triangular number.
Formula to calculate nth Centered Triangular number.
Driver Code.
For 3 rd Centered Triangular number.
For 12 th Centered Triangular number"
How can the above be solved in Python?
 ... Give me a code to centered triangular number and the other steps required?
assistant
#Here is code to centered triangular number and the other steps required.
 def Centered_Triangular_num ( n ) :
	return ( 3 * n * n + 3 * n + 2 ) // 2
if __name__ == ' _ _ main _ _ ' :
	n = 3
	print ( Centered_Triangular_num ( n ) )
	n = 12
	print ( Centered_Triangular_num ( n ) )