![]() |
|
|
#1 |
|
I quite division it
"Chris"
Feb 2005
England
31·67 Posts |
Create primes by arranging the strings produced from progressive powers of 2 from 2^0 to 2^n. i.e.
A prime using the string "1", none. A prime using the strings "2" and"1", none. A prime using the strings "4", "2" and "1", 421 or 241. etc. No taking parts of strings. All strings from 1 to your chosen n must be used. What is the largest prime you can make? The largest prime for the strings in order or near order, near reverse etc? The largest prime that is also a twin (+2 or -2) or has other interesting properties? Kudos for posting small, efficient code. If this is known or on OEIS create a similar more interesting puzzle!
|
|
|
|
|
|
#2 |
|
Mar 2007
Austria
4568 Posts |
How about this small little PARI-GP function:
Code:
for(z=1,100,y=2^z;for(x=1,z-1,y*=10^(ceil(log(2)*(z-x)/log(10)));y+=2^(z-x));y*=10;y++;write("cand_puzzle.txt",y))
z(1)=21 z(2)=421 z(3)=8421... upto z=100.(you can ofcourse go further if you want) Then pump the output into PFGW and hopefully I'll find something! |
|
|
|
|
|
#3 | |
|
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
22×7×167 Posts |
Quote:
i.e. in 1,2,4,8,16,32 --- the 16 and the 32 can't be split as in 41823621? It "appears" that every second string starting with 1,2 add up to a multiple of 3 and so CANNOT be prime. |
|
|
|
|
|
|
#4 |
|
Jun 2003
5,051 Posts |
Basic restrictions -- all powers of two end in an even digit except 1. So only permutations ending in 1 has a chance of being prime. Also, for even n, the sum of digits of 2^0 .. 2^n is divisible by 3. So only odd 'n' has a chance of yielding primes.
|
|
|
|
|
|
#5 |
|
I quite division it
"Chris"
Feb 2005
England
1000000111012 Posts |
|
|
|
|
|
|
#6 |
|
Mar 2010
On front of my laptop
7×17 Posts |
220 digits
Code:
8589934592838860881928687194767366710886465536645368709125242885124294967296419430440964343597383683355443232768322684354562621442562147483648209715220482171798691841677721616384161342177281310721048576107374182410241281 8589934592_8388608_8192_8_68719476736_67108864_65536_64_536870912_524288_512_4294967296_4194304_4096_4_34359738368_33554432_32768_32_268435456_262144_256_2147483648_2097152_2048_2_17179869184_16777216_16384_16_134217728_131072_1048576_1073741824_1024_128_1
|
|
|
|
|
|
#7 |
|
I quite division it
"Chris"
Feb 2005
England
1000000111012 Posts |
Very nice. How did you find it?
|
|
|
|
|
|
#8 | |
|
Mar 2007
Austria
2·151 Posts |
Quote:
Will try another orientation and hopefully I can beat the 220 digit record! |
|
|
|
|
|
|
#9 |
|
Aug 2006
3·1,993 Posts |
I have a 1224-digit prime using the powers of 2^0 to 2^88:
Code:
309485009821345068724781056154742504910672534362390528773712524553362671811952643868562622766813359059763219342813113834066795298816967140655691703339764940848357032784585166988247042417851639229258349412352120892581961462917470617660446290980731458735308830223145490365729367654415111572745182864683827275557863725914323419136377789318629571617095681888946593147858085478494447329657392904273924722366482869645213696236118324143482260684811805916207174113034245902958103587056517122951479051793528258561475739525896764129287378697629483820646436893488147419103232184467440737095516169223372036854775808461168601842738790423058430092136939521152921504606846976576460752303423488288230376151711744144115188075855872720575940379279363602879701896396818014398509481984900719925474099245035996273704962251799813685248112589990684262456294995342131228147497671065614073748835532870368744177664351843720888321759218604441687960930222084398046511104219902325555210995116277765497558138882748779069441374389534726871947673634359738368171798691848589934592429496729621474836481073741824536870912268435456134217728671088643355443216777216838860841943042097152104857652428826214413107265536327681638481924096204810245122561281632864421 |
|
|
|
|
|
#10 | |
|
Nov 2003
22·5·373 Posts |
Quote:
Using your rules, I expect only finitely many; the numbers grow too fast. |
|
|
|
|
|
|
#11 |
|
I quite division it
"Chris"
Feb 2005
England
31·67 Posts |
|
|
|
|
![]() |
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 |