public static void main(String[] args) {
		long start = System.currentTimeMillis();
				
		BigInteger supertot = BigInteger.ZERO;
		for (int k = 2; k <= 300; k++) {
			int base = 6*k+3;
			
			Problem414SE_HER.base = base;
			Problem414SE_HER.COUNT.clear();
			Problem414SE_HER.Cb = Problem414SE_HER.findCb(new int[] {0,0,0,0,1});
			for (int i = 0; i < 5; i++) {
				Problem414SE_HER.pow[i] = (long) Math.pow(base, i);
			}
			
			long tot = 0;
			
			/**
			 * [x,x,x,x,i-1]
			 * 
			 * denne er litt retard xD se metode under
			 */
			//de frste (base) sifferene
			long[] perms = new long[base];
			for (long i = 2; (i-1) < base; i++) {
				long number = ((2*base-i)*(i-1))*5;
				perms[(int) (i-1)] = number;
			}
			for (int i = 1; i <= base/2; i++) {
				int[] v1 = decode(i,base);
				tot += perms[2*i-1]*Problem414SE_HER.firstsb(v1);
				
				
				int[] v2 = decode(base-i,base);
				tot += perms[2*i]*Problem414SE_HER.firstsb(v2);
				
			}
			/**
			 * [x,x,x,i,i]
			 */
			//begge siffere like
			for (long i = 1; i < base; i++) {
				long number = 1*(base-i)*(3*i-1)*10;
				tot+=number*Problem414SE_HER.firstsb(decode(i*(base+1),base));
			}
			
			/**
			 * [x,x,x,i,i+n]
			 * for a,a+n: number=2*(base-i)*(4*6*i-(6*n*n-12*n+7))
			 */
			for (int n = 1; n < base; n++) {
				for (long i = n+1; true; i++) {
					long number = 2*(base-i)*(n*6*i-6*n*n-1)*10;
					if (number<=0)
						break;
					tot+=number*Problem414SE_HER.firstsb(decode((i-n)*base+i,base));;
				}
			}
			System.out.println(k + " " + (tot-1));
			supertot = supertot.add(BigInteger.valueOf(tot-1));
		}
		System.out.println(supertot.mod(BigInteger.TEN.pow(18)) + " ("+(System.currentTimeMillis()-start)+"ms)");
	}