human
Centered tetrahedral number | Function to calculate Centered tetrahedral number.
Formula to calculate nth Centered tetrahedral number and return it into main function.
Driver Code"
Solution in Python:
assistant
#Here is code to centered tetrahedral number and the other steps required.
 def centeredTetrahedralNumber ( n ) :
	return ( 2 * n + 1 ) * ( n * n + n + 3 ) // 3
n = 6
print ( centeredTetrahedralNumber ( n ) )