public static void main ( String [] args ) {
	int i=0;
	boolean flag = true;
	long num = 0;
	
	while ( flag ) {
	    num = hex(i);
	    if ( isTri(num) && isPen(num) && num>40755 ) {
		System.out.println(num);
		flag = false;
	    }
	    i++;
	}
    }