public static void main ( String [] args ) {

	int max = 0, maxi=0, tmp1=0, tmp2=0;
	for ( int i=1; i<1000; i++ ) {
	    tmp1 = factor(i);
	    if ( tmp1 != 1 && tmp1 != 2 && tmp1 != 5 ) {
		tmp2 = len(tmp1);
		if ( tmp2 > max ) {
		    max = tmp2;
		    maxi = i;
		}
	    }
	}
	
	System.out.println("d contains the longgest recurring cycle = " + maxi);
    }