Find five 11-digit pandigital primes P<Q<R<S<T that can be written in a column so that each of the first 10 columns of digits has 5 distinct digits.
Find the set with smallest T.
T = 5011234678
The first set
(the one with lowest P,Q,R,S & T) is:
PDP Place on PDP
n n-list
------------------------------------
14355809627 1 269863
23440687159 2 228957
32204158967 3 131977
41021563897 4 92582
50112346789 5 1
This T (as Larry noted) is the smallest "5-PDP" of length 11.
It persists in giving valid solutions for the column
constraint. E.g, the millionth example that works is,
PDP Place on PDP
n n-list
------------------------------------
14390827651 273758
23457680419 230324
32204158967 131977
41021563897 92582
50112346789 1
where R, and S, haven't budged.
I did the problem via brute force, along with a couple of
short cuts: the repeated 11th digit cannot be 0, 3, 6, or 9,
since the sum of digits would then be a multiple of 3 and
make number non-prime. I needed (I thought) to sort all
candidate pd numbers in increasing order, and that took a lot
of time (10 hr cpu) but even that went faster than expected
using file structures to sort 1000 sets 8-digit pandigit
numbers + 3 leading digits separately. Had I known the 50112346789
worked, then any example with it present is a proof, and sorting
would have been unnecessary.
I found solutions from bottom to top, starting with the rows
and finding columns that worked. After finding a 1,2,3,4,5
1st column solution that worked (below), I knew to instead start
my search first with T.
10123457689 1
21014368579 95819
32201574869 131944
43450826917 307877
54342681709 392700
Larry's shortcut grid idea was very clever. I am not sure if
solving the problem by using a grid with legal columns and
then finding legal rows (Larry's method) or the reverse order (my
method)is harder, but in any even, the task is long.
Programs and a complete set of PD-11 primes are here:
make_all_11-pan-digit numbers
make_all_11_pds_increasing_sorted
find_all_11_pd_primes
find_smallest_T
list_of_all_11_digit_pan_primes
Edited on August 12, 2023, 7:39 pm