Function to check if N is a super - d number
static boolean isSuperdNum ( int n ) { for ( int d = 2 ; d < 10 ; d ++ ) { String subString = newString ( d ) ; if ( String . valueOf ( ( d * Math . pow ( n , d ) ) ) . contains ( subString ) ) return true ; } return false ; }