Program to check if N is a triacontagonal number | Python3 program to check whether a number is an triacontagonal number or not ; Function to check whether a number is an triacontagonal number or not ; Condition to check whether a number is an triacontagonal number or not ; Given number ; Function call
import math ; NEW_LINE def istriacontagonal ( N ) : NEW_LINE INDENT n = ( 26 + math . sqrt ( 224 * N + 676 ) ) // 56 ; NEW_LINE return ( n - int ( n ) ) == 0 ; NEW_LINE DEDENT i = 30 ; NEW_LINE if ( istriacontagonal ( i ) ) : NEW_LINE INDENT print ( " Yes " ) ; NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) ; NEW_LINE DEDENT