private static void palindrome(int range) {
		int[] table = new int[range];
		int c = 0;
		for (int i = 0; i < 10; i++) {
			table[c++] = i;
		}
		for (int i = 11; i < 100; i += 11) {
			table[c++] = i;
		}
		int count = 2;
		int n = 100;
		for (int i = 101; i < range; i += 10) {
			if (i > n * count) {
				i = (n * count) + count;
				count++;
			}
			table[c++] = i;

		}
		int x = 10;
		int icount = 100;
		count = 2;
		n = 1000;
		for (int i = 1001; i < range; i += (icount + x)) {
//			if (n)
				if (i > n * count) {
					i = (n * count) + count;
					if (count == 10) {
						count = 2;
					} else {
						count++;
					}
				}
			table[c++] = i;
		}

		for (int i = 0; i < range; i++) {
			System.out.print(table[i] + " ");
		}

	}