Are there any three distinct digits a , b , c such that all six permutations a b c , a c b , b a c , b c a , c a b , c b a are prime numbers?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
An interesting explanation.
Nice to see how you check for primes without gadgetry!
Observing that one of the numbers is divisible by 7 is interesting. Perhaps there is a better way to present that argument?
E.g. one simplification is that we want to show 0 a + 1 b + 2 c + 3 d ≡ 0 ( m o d 7 ) has a solution with { a , b , c , d } = { 1 , 3 , 7 , 9 } for all values of a = 1 , 3 , 7 , 9 .
Why do we have to check for dividibility up to 31?
Log in to reply
The largest number we can make is 9 7 3 , which lies between 3 1 2 and 3 2 2 .
That’s how I did with this problem. But instead of enumeration method do you have any other more elegant solutions?
Log in to reply
Limiting the 120 possible sets of three distinct digits to 4 is already pretty elegant :)
What about if the distinct digits were 0, 1, and 3, for example? Then, both 13 and 31 are prime, and make up all six permutations.
Log in to reply
If you use the digit 0, along with 1 and 3, your list of numbers in increasing order must be 13, 31, 103, 130, 301, 310.
Clearly some of these are not prime.
Log in to reply
We commonly assume that numbers do not start in zero.
Log in to reply
@Arjen Vreugdenhil – Also neither 0 nor 1 are considered prime in any case - 2 is considered to be the first prime number.
Log in to reply
@Thomas Sutcliffe – But neither 0 nor 1 is a number you can make from 3 distinct digits, so neither can be a number we need to check for primality.
Good solution.
Following up on your mod 7 work, I think you can also say: if none of the six permutations are multiples of 7, and neither are a or b, but c is, then a ≡ ± b m o d 7 .
Log in to reply
Not quite. It appears that you overlooked a multiplication by 10.
If c ≡ 0 mod 7, then a b 0 is a multiple of 7 iff a b ≡ 0 mod 7, i.e. 3 a ≡ − b mod 7.
(Example: 347 is not a multiple of 7, even though 3 ≡ − 4 mod 7. But 3 ⋅ 3 ≡ 2 ≡ − 4 mod 7.)
(Other example: 357 is a multiple of 7, even though 3 ≡ − 5 mod 7. But 3 ⋅ 3 ≡ 2 ≡ − 5 mod 7.)
Log in to reply
What about the qualifier, "If none of the six permutations are multiples of 7?"
I noticed some interesting properties of multiples of 7 in this problem. Does anyone know a mathematical proof that could be used instead of checking through trial and error? Every set had one multiple of 7.
I also solved by trial and error - if repeated dgits are allowed then 337 works, since 373 and 733 are both also prime.
Extensions have been suggested: What if we work with four distinct digits? What if we allow two or more of the digits to be equal? Might I suggest another one: what if all the numbers are expressed to some base other than 10?
I came across this easier method to check divisibility by 7 Remove the last digit, double it, subtract it from the truncated original number and continue doing this until only one digit remains. If this is 0 or 7, then the original number is divisible by 7. Example: 371->37-1(2)=35 which us div by 7, thus no is div by 7
Do you have PhD in maths?
I definitely misread the original problem and did the extension instead. I also quickly narrowed it down to 1, 3, 7, and 9 as digits to work with, and saw quickly that 1, 3, and 9 wasn't going to work , nor would all 1's (111 is divisble by 3), or all of any but I figured that 113 would, and since there are two 1's the number of unique numbers was limited, after checking 131 and 311 I said the answer was yes, then upon getting the wrong answer I reread the question and saw my mistake.
Good question though.
Why does it say only check prime numbers till 31
I have to be honest my solution is kind of ugly and involves some rigorous work but here it is anyways.
First off let's start by eliminating possibilities of digits. Obviously a , b or c cannot be even, nor can any of them be the digit 5 . This leaves us with the possible digits 1 , 3 , 7 and 9 .
How many ways are there of choosing 3 digits/items in a list of 4? 4 C 3 or 4 ways. The possible picks are ( 1 , 3 , 7 ) , ( 1 , 7 , 9 ) , ( 1 , 3 , 9 ) or ( 3 , 7 , 9 ) .
The only thing left to show is that at least one of the permutations of these three picks are not prime.
So I used a prime number database and found that for ( 1 , 3 , 7 ) , 7 3 1 was not prime. For ( 1 , 7 , 9 ) , 7 9 1 was not prime. For ( 1 , 3 , 9 ) , 9 3 1 was not prime and finally for ( 3 , 7 , 9 ) , 7 9 3 was not prime.
This means that no there do not exist any 3 distinct digits a , b , c such that all 6 permutations a b c , a c b , b a c , b c a , c a b and c b a are all prime.
The reason I say it's not a nice solution is because in the worst case scenario you would have to end up checking if 24 numbers are prime or not prime.
Solved it the same way. I thought only I could have such an ugly solution. Thank you
No. From the list of all 3-digit prime numbers we eliminate all with repeating digits, all containing the even digits 02468, and all containing 5. We end up with 13 eligible primes made from 1379. Direct check gives us these lines:
137,173,317;
179,197,719,971;
139,193;
379,397,739,937.
None of these lines has 6 primes.
? 113,131,311 ?
Log in to reply
Distinct digits, i.e. each digit is only allowed to be used once.
Are there any three DISTINCT digits... So, No repeating digits.
DIVISIBILITY BY 2?
DIVISIBILITY BY 5?
REVISED QUESTION:
DIVISIBILITY BY 3?
FOUR SUBSETS TO CONSIDER!
DIVISIBLE BY 7?
A (relatively) simple check for divisibility of the number XYZ is to test the divisibility of XY - 2Z.
Let's scan each subset to see if we can find one permutation that is divisible by this trick:
CONCLUSION
ONE MORE TRICK? DIVISIBLE BY ELEVEN?
XYZ is divisible by 11 if and only if X+Z-Y is divisible by 11
913? 9+3-1 = 11 → 11 is divisible by 11, so 913 is divisible by 11.
But we didn't need this final test, as we already proved it above. I just included it here because it's a neat little trick.
You can use Algebra to prove why these tricks work.
I dunno. Let's find out:
1 |
|
Or more readably:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Which gives us:
1 |
|
Mathematica
Select[Subsets[Range[0, 9], {3}],And@@PrimeQ[FromDigits/@Permutations@#]&]
yields NO
I disagree. The problem never said that these numbers with three digits were in base 10. I feel pretty confidant that if we choose the right base, we'll be able to find a combination that works.
If you are going to think along those lines: all numbers you ever work with are in base 10.
Even binary numbers and hexadecimal numbers are in base 10.
Problem Loading...
Note Loading...
Set Loading...
Since any 3-digit numbers ending in an even digit or 5 are not prime, we limit ourselves to the digits 1, 3, 7, 9. We can make four subsets: { 1 , 3 , 7 } , { 1 , 3 , 9 } , { 1 , 7 , 9 } , { 3 , 7 , 9 } . We must check divisibility by primes up to 31.
For divisibility by 3, consider the sum of digits. For the four sets of digits, they are 11, 13, 17, 19, none of which are multiples of three.
For divisibility by 7, consider that x y z is a multiple of 7 iff 2 x + 3 y + z is. This simplifies even more if one of the digits is 7.
Since 2 ⋅ 3 + 1 = 7 , 3 7 1 is a multiple of 7. This rules out the first set.
Since 2 ⋅ 9 + 3 ⋅ 1 = 2 1 is a mutiple of 7, so is 9 1 7 . This rules out the third set.
Since 2 ⋅ 9 + 3 = 2 1 is a multiple of 7, so is 9 7 3 . This rules out the fourth set.
The second set also has a multiple of 7 (931) but this may be harder to see. Note, however that 9 − 1 + 3 = 1 1 , so that 9 1 3 is a multiple of 11. Either way, we have excluded the second set.
Therefore there are no sets of three digits that satisfy the requirements.
Extensions: What if we work with four distinct digits? What if we allow two or more of the digits to be equal?