All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Forty Four Digit Decision (Posted on 2022-05-30) Difficulty: 3 of 5
Is it possible to arrange 11 positive integers from 1985 to 1995 (inclusively) in an arbitrary order such that the resulting 44-digit number is a prime number?
If so, provide an example.
If not, prove it.

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 1 of 2
It is not possible.

The even-positioned digits of, say, 19871985199319861990199519911989199419921988
add up to 1205. The odd positions total 1161. The difference is 44, as will be the the case regardless of the order, making the number formed from every possible order divisible by 11, as the positioning of the 4-digit numbers does not change the parity of the positioning of its individual digits in the full number.

Before realizing that, I had tried unsuccessfully to find a prime:

intList=[1985:1995]; tries=0; primeCt=0;
sz=length(intList);
tottries=0;
found=false;
while found==false
   subs=randperm(sz);
   list=intList(subs);
   s=sprintf('%d',list);
   n=sym(s);
   tries=tries+1; % disp(tries)
   if isprime(n)
      fprintf('%6d %s\n',tries,n);
      tottries=tottries+tries;
      tries=0; primeCt=primeCt+1;
      found=true;
   end
end

which led me to the conclusion that for some reason none were prime after thousands of permutations were tried, as I knew the primes were not so sparse in that area that no primes would have been found, and in fact extending the range to 1998 finds a prime rather rapidly. (extensions to 1996 and 1997 run into multiple of 3 and multiple of 11 problems respectively).. The sum of the digits in the original was not a multiple of 3, but then I tried the sum of odd vs even digits and voila.

How many random permutations tried before finding a prime using the extension to 1998, done several times, to give an idea of the sparseness of primes with integers of this length:

 tries                   prime
     9 19881997199319911995198619851992199019891998199419961987
    40 19871985199619921991198819941998198619951993198919901997
    45 19871995198519961988198619931998198919941990199219971991
    69 19941995199019861996198819851998199219891993199119871997
    83 19861987199519891998199219931991199619941990198819851997
   174 19911994199819901992199619931997198519881986199519891987
    16 19851987198819891995199619981994198619921991199019971993
    21 19941997199219981993198919901986198519881996199119951987
   151 19871988199819931986199119921985199719941995199019961989
    72 19951986199119971998198819851994199219931996198919901987
    13 19861987199719851996199019881998199519911989199219941993
   368 19891992199619911987198819901986199419981995199719851993
    84 19981994199619901985198719911993198819861992199719951989
    97 19911989199319981986199419921995199019851988199619971987
   232 19921996199519901987199119851994199819931986198819891997
    85 19951996199019851987199219861994199819891991198819931997
     2 19901991199819931994198819891992198619951987199619851997
    22 19921991199719861996199019851988199419951989199819931987
    68 19941990199119951998198619871997199219881993199619851989
   108 19931998198919961988198619851994199019921995199119871997  
   
shows an average of about 88 tries (distance between) to find a prime among the random permutations of 14 4-digit numbers.  

In fact any concatenation of 11 even-length successive integers will have the property of being a multiple of 11.

  Posted by Charlie on 2022-05-30 11:37:17
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information