public static void main(String[] args) {
		int limit = 120;
		int[] ks = new int[limit+1];
		Arrays.fill(ks, Integer.MAX_VALUE);
		for (int i = 2; i <= limit*4; i++) {
			for (int k : k(i)) {
				if (k == 10 && ks[k] > i) {
					System.out.println("++++++++++++++"+i);
				}
				if (k <= limit)
					ks[k] = Math.min(ks[k], i);
			}
		}

		Set<Integer> set = new HashSet<Integer>();
		for (int i = 2; i <= limit; i++) {
			set.add(ks[i]);
			System.out.println(i + " " + ks[i]);
		}
		
		long sum = 0;
		for (Integer integer : set) {
			sum+=integer;
		}
		System.out.println(sum);
		
		System.out.println(k(16));
	}