Program to check if N is a Centered Tridecagonal Number | Java program for the above approach ; Function to check if the number N is a centered tridecagonal number ; Condition to check if the N is a centered tridecagonal number ; Driver Code ; Given Number ; Function call
class GFG { static boolean isCenteredtridecagonal ( int N ) { float n = ( float ) ( ( 13 + Math . sqrt ( 104 * N + 65 ) ) / 26 ) ; return ( n - ( int ) n ) == 0 ; } public static void main ( String [ ] args ) { int N = 14 ; if ( isCenteredtridecagonal ( N ) ) { System . out . print ( " Yes " ) ; } else { System . out . print ( " No " ) ; } } }