mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2011-02-09, 21:22   #34
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

35×13 Posts
Default

I tested the 2 strings without "shuffling":

2n..20:
Only prime is n=2: 421 for n<636 (61106 digits)

21..2n20:
Two primes for prime n=2: 241 and n=4: 248161. No others for n<656 (65200 digits)

I also tested how many of the n! numbers are prime for small n:

n=2 (3 digits): 2 primes of 2 numbers
n=4 (6 digits):11 primes of 24 numbers
n=6 (10 digits): 104 primes of 720 numbers
n=8 (16 digits): 4254 primes of 40320 numbers
n=10(23 digits): 260732 primes of 3628800 numbers.
ATH is offline   Reply With Quote
Old 2011-02-09, 21:37   #35
Flatlander
I quite division it
 
Flatlander's Avatar
 
"Chris"
Feb 2005
England

31·67 Posts
Default

Quote:
Originally Posted by ATH View Post
I tested the 2 strings without "shuffling":

2n..20:
Only prime is n=2: 421 for n<636 (61106 digits)
Is it provable that it's the only one? (Maybe it's a pointless exercise anyway.)
All I could find was this: http://tech.groups.yahoo.com/group/p.../message/19065

Quote:
Originally Posted by ATH View Post
...
I also tested how many of the n! numbers are prime for small n:

n=2 (3 digits): 2 primes of 2 numbers
n=4 (6 digits):11 primes of 24 numbers
n=6 (10 digits): 104 primes of 720 numbers
n=8 (16 digits): 4254 primes of 40320 numbers
n=10(23 digits): 260732 primes of 3628800 numbers.
Much more than I would have guessed when I started this thread.
Flatlander is offline   Reply With Quote
Old 2011-02-09, 21:37   #36
axn
 
axn's Avatar
 
Jun 2003

10011101110112 Posts
Default

Quote:
Originally Posted by Batalov View Post
I used perl to manipulate strings (pregenerated with BigInt), sans '1'. With an array of strings, just swap two random strings at a time, concat (with '1' at end) and pipe into pfgw. Just my 2c.
While you're at it, it is probably a good idea to use the lexically largest string as the first one, which will yield bigger primes for a given combination.
axn is offline   Reply With Quote
Old 2011-02-09, 22:23   #37
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36·13 Posts
Default

Done that last night. There were just two small primes: 842161, 8644322161.

That and unpermuted concat as other people have done. Nothing new up to n~=750.
Which is as expected: a finite set, and a very short one, at that.
(421 is in both sets)

Last fiddled with by Batalov on 2011-02-09 at 22:31 Reason: 421 :-)
Batalov is offline   Reply With Quote
Old 2011-02-10, 00:03   #38
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22·1,549 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
It's all in how you count it: is #88 2^0 through 2^88 or 2^0 through 2^87?
The OP defines n.
Quote:
Originally Posted by Flatlander View Post
Create primes by arranging the strings produced from progressive powers of 2 from 2^0 to 2^n.
retina is online now   Reply With Quote
Old 2011-02-10, 03:17   #39
axn
 
axn's Avatar
 
Jun 2003

5,051 Posts
Default

Quote:
Originally Posted by Batalov View Post
Done that last night. There were just two small primes: 842161, 8644322161.
No. I don't mean sort _all_ of them. Just pick the largest one of the set to be the prefix. Permute the rest as usual. That way, your prime would be one of the biggest for the given n. It is a cheap optimization to get a minor increase in prime size.
axn is offline   Reply With Quote
Old 2011-02-10, 04:04   #40
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by retina View Post
The OP defines n.
Yes, and I could have been using that n or n = |S|. It's not like I looked back at the OP before writing such a straightforward comment.
CRGreathouse is offline   Reply With Quote
Old 2011-02-10, 09:42   #41
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Quote:
Originally Posted by axn View Post
No. I don't mean sort _all_ of them. Just pick the largest one of the set to be the prefix. Permute the rest as usual. That way, your prime would be one of the biggest for the given n. It is a cheap optimization to get a minor increase in prime size.
Yep, quite right, easily done.
And with that in mind, a prp20624 (n=368).
It had very few permutations away from a lexicographically reverse-sorted starting point.
Attached Files
File Type: zip prp20624.zip (11.9 KB, 134 views)
Batalov is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Digit strings containing primes davar55 Puzzles 13 2018-03-15 14:46
Sieving with powers of small primes in the Small Prime variation of the Quadratic Sieve mickfrancis Factoring 2 2016-05-06 08:13
Bashing Strings Parsimoniously in Linux EdH Programming 15 2013-05-06 11:04
ubasic question - strings Andi47 Programming 5 2008-12-28 05:52
Strings of Digits davar55 Puzzles 5 2008-11-02 00:08

All times are UTC. The time now is 19:13.


Fri Jul 16 19:13:56 UTC 2021 up 49 days, 17:01, 1 user, load averages: 1.90, 2.09, 2.57

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.