Post Reply 
an interesting problem
05-03-2015, 03:10 AM
Post: #12
RE: an interesting problem
There can't be an even digit (or zero) since putting that digit in the final position results in a composite number. Likewise, we can't have a five. That leaves: 1, 3, 7 & 9 as possible digits.

Since we're not allowed repeated digits we have to check:

Code:
137
139
179
379

For each of these four we need to check all digit permutations:

Code:
137
173
317
371
713
731

139
193
319
391
913
931

179
197
719
791
917
971

379
397
739
793
937
973

So twenty four possibilities here. However by judiciously choosing composite numbers first, we can do it in with four tries Smile

Code:
371
319
791
793

More realistically, by starting at the top of each list of six and stopping when we find a composite, we have to make fifteen primality checks.

- Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
an interesting problem - Don Shepherd - 05-02-2015, 08:37 PM
RE: an interesting problem - Gerald H - 05-02-2015, 09:05 PM
RE: an interesting problem - Don Shepherd - 05-02-2015, 09:53 PM
RE: an interesting problem - TASP - 05-02-2015, 11:27 PM
RE: an interesting problem - Don Shepherd - 05-02-2015, 11:44 PM
RE: an interesting problem - RayAtHP - 05-03-2015, 12:01 AM
RE: an interesting problem - Don Shepherd - 05-03-2015, 12:33 AM
RE: an interesting problem - Don Shepherd - 05-03-2015, 01:50 AM
RE: an interesting problem - Paul Dale - 05-03-2015 03:10 AM
RE: an interesting problem - Paul Dale - 05-03-2015, 05:07 AM
RE: an interesting problem - Paul Dale - 05-03-2015, 05:09 AM
RE: an interesting problem - Thomas Klemm - 05-03-2015, 05:42 AM
RE: an interesting problem - Don Shepherd - 05-03-2015, 06:49 AM
RE: an interesting problem - Don Shepherd - 05-03-2015, 04:21 PM
RE: an interesting problem - Joe Horn - 05-04-2015, 02:23 PM



User(s) browsing this thread: 1 Guest(s)