private int numberInFamily(int pN){
		int maxCount = 0;
		int count = 0;
		for(int p1 = 10; p1 < pN; p1*=10){
			int digit1 = (pN%(p1*10)-pN%(p1)) / p1;
			for(int p2 = 10;digit1 < 3 && p2 < p1; p2*=10){
				int digit2 = (pN%(p2*10)-pN%(p2)) / p2;
				for(int p3 = 10; digit1 == digit2 && p3 < p2; p3*=10){
					int digit3 = (pN%(p3*10)-pN%(p3)) / p3;
					count = 0;				
					for(int num = 1; digit1 == digit3 && num + digit1 < 10 ;num++){
						int numToAdd = (num*p1) + ((num)*p2) + (num*p3);
						int check = pN+numToAdd;
						if(isPrime(check)){
							count++;
						}
					}
					if(count > maxCount){
						maxCount = count;
					}
				}
			}
		}
		return maxCount + 1;
	}