Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is it possible

  1. Sep 23, 2010 #1
    Is it possible to write the 2010 numbers from 1 a 2010 in some order so that the
    6933 digit number you get is prime?
  2. jcsd
  3. Sep 23, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    http://www.jimloy.com/number/nines.htm [Broken]
    Last edited by a moderator: May 4, 2017
  4. Oct 6, 2010 #3
    I get 4/10*2009! ways to do it. It helps to know the 6933 digit is the last digit.
  5. Oct 6, 2010 #4


    User Avatar
    Science Advisor
    Homework Helper

    Hint: 1 + 2 + ... + 2010 = 2010 * 2011 / 2.
  6. Oct 7, 2010 #5
    This does not answer or perhaps even hint at an answer to the original question, but 2010 is not 3n+1.
    For 3n+1 numbers concatenated you can extremely quickly find a "prime permutation."
    For other than 3n+1 there are either no solutions (for small n) or it can take a very long time and I do not know whether there are solutions or not.

    This surprising behavior persists up to at least 157.
    Why? It seems like there should be a good answer for this.
    Last edited: Oct 7, 2010
  7. Oct 7, 2010 #6


    User Avatar
    Science Advisor
    Homework Helper

    It's not... all factorials of numbers >= 3 are of the form 3n.
  8. Oct 7, 2010 #7


    User Avatar
    Science Advisor
    Homework Helper

    That's not right, either.
  9. Oct 7, 2010 #8
    I think this problem needs clarified because what I understood it to be is obviously different than everyone else. I saw the problem as simply writing the numbers down in order to create one big long number. For instance if you write the numbers from 1 to 3 in some order you can get 123 132 213 231 312 or 321. It seemed even more likely(to me) this was the problem when you add up the number of digits in each number from 1 to 2010 and get 6933 which is the digit asked for. At that point I saw it as simply taking out a number which ended with 2, 3, 5 or 7 and writing all the rest in any order you wish followed by the number you took out.
  10. Oct 7, 2010 #9
    It would do you good to observe that all six of these permutations are divisible by 3.

    You could then try to generalize that observation.
  11. Oct 8, 2010 #10
    When the original poster wrote "write the 2010 numbers from 1 a 2010 in some order so that the 6933 digit number" I read that to mean "does there exist a permutation of the 2010 numbers such that all their digits then concatenated"

    When I first wrote "but 2010!=3n+1" I did not mean to imply 2010 factorial and instead meant "but 2010 is not equal to 3n+1" and I later edited that sentence to try to be more clear.

    When I then wrote that I observed a pattern for 3n+1 numbers I have now expanded that claim.

    For numbers m up to 301 a prime formed from the concatenation of the digits of a permutation of the numbers 1...m can be found in the first 7 factorial permutations I inspect for all numbers of the form 3n+1 except for 160, 172, 271, 283 and 298 and for none of the numbers of the form 3n or 3n+2. For 160 no "prime permutation" was found in the first 2924903 permutations inspected, but I expect that with more permutations inspected that a prime will be found.

    It appears that the number of permutations that must be inspected to find a prime is a slowly growing function of n, as I would expect, so it is not too surprising that for larger m there are more examples of numbers that are resistant to finding a "prime permutation" in the first 7 factorial permutations, with the permutations enumerated in lexographic order I believe.

    Just to be clear, that 7 factorial threshold I used has no deep significance. I simply looked at the last few permuted numbers in each discovered prime and saw that initially usually 7 or fewer were interchanged.
  12. Oct 8, 2010 #11


    User Avatar
    Science Advisor
    Homework Helper

    2010 isn't of the form 3n+1, though.
  13. Oct 8, 2010 #12
    I'm not sure why this is of any use and would do me good but I will go ahead and generalize it.

    Any (base 10) number whose digits are the permutation of the digits of a number which is divisible by 3 is divisible by 3. I will leave it up to the reader to prove that any permutation can be represented by a series of permutations which simply swap 2 items. Suppose you have a number n and you flip the p and q digits and they're corresponding values are a and b. The resulting number will be


    We can arbitralily say p<q so we can write the number as


    It is easy to see that that [tex]10^{q-p}-1[/tex] is divisible by 3 so the new number is the sum of terms which are all divisible by 3 and so is divisible by 3.

    It follow that if you take the numbers from 1 to 3n and concatenate their digits in some order the resulting number is divisible by 3. This is true for n=1 simply by checking. Assume it is true for some k. We only have to show that the next 3 numbers concatenated to the end of any permutation of the numbers up to 3k in counting order is divisible by 3. Now it is easy to see that 3n-1, 3n-2, and 3n all have the same number of digits. If one had more digits than the others (either 3n-1 or 3n-2), then a number smaller than it would be of the form
    [tex]10^p-1[/tex] for some p. However, this number is divisible by 3 and so could not be 3n-1 or 3n-2. Let s be the number of digits of 3(k+1) and r be a permutation of the numbers up to 3k. Now consider the number


    This number is a permutation of the numbers from 1 to 3(k+1). Since 21 is divisible by 3 and by the previous proof 2 followed by s zeros followed by 1 is divisible by 3. Therefore this permutation is the sum of numbers divisible by 3 and is divisible by 3. By induction, the proof is complete.

    It follows that no permutation of the 2010 numbers is prime.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook