Post Reply 
puzzle
06-29-2018, 04:27 AM
Post: #2
RE: puzzle
(06-29-2018 03:40 AM)Don Shepherd Wrote:  How many 4-digit arrangements of the digits of the number 1232 are prime?
Code:
Spoiler Alert












3

1223
2213
3221

Quote:How many 4-digit arrangements would you have to check?
Code:
Spoiler Alert












12 = 4! / 2!

1223
1232
1322
2123
2132
2213
2231
2312
2321
3122
3212
3221

Quote:Is there a way to check other than an electronic prime factor finder or our old friend, brute force?
Code:
Spoiler Alert












Even numbers are rarely prime:
1232
1322
2132
2312
3122
3212

Check alternating sum of digits:
2123 -> 2 - 1 + 2 - 3 = 0 => divisible by 11: 2123 = 11 * 193
2321 -> 2 - 3 + 2 + 1 = 0 => divisible by 11: 2321 = 11 * 211

Brute force:
2231 = 23 * 97

That was fun.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
puzzle - Don Shepherd - 06-29-2018, 03:40 AM
RE: puzzle - Thomas Klemm - 06-29-2018 04:27 AM
RE: puzzle - ijabbott - 06-29-2018, 07:53 AM
RE: puzzle - Don Shepherd - 06-29-2018, 12:15 PM
RE: puzzle - Thomas Klemm - 06-29-2018, 02:08 PM
RE: puzzle - brickviking - 06-30-2018, 11:32 PM



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