Program to check if N is a Centered Tridecagonal Number | Python3 program for the above approach ; Function to check if the number N is a centered tridecagonal number ; Condition to check if N is centered tridecagonal number ; Given Number ; Function call
import numpy as np NEW_LINE def isCenteredtridecagonal ( N ) : NEW_LINE INDENT n = ( 13 + np . sqrt ( 104 * N + 65 ) ) / 26 NEW_LINE return ( n - int ( n ) ) == 0 NEW_LINE DEDENT N = 14 NEW_LINE if ( isCenteredtridecagonal ( N ) ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT