Function to count divisors of n ^ 2 having no factors of ' n '
static int factors ( int n ) { HashMap < Integer , Integer > prime = new HashMap < Integer , Integer > ( ) ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; ++ i ) { while ( n % i == 0 ) {