mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2012-04-03, 19:03   #1
bcp19
 
bcp19's Avatar
 
Oct 2011

2A716 Posts
Default Lotto Primes

With the recent lotto fever, I got to thinking about a puzzle. Given 6 lotto numbers, 5 ranged 1-56 and 1 ranged 1-46(010203040501 to 525354555646), there are 720 combinations that each 6 number result can be arranged. What set of numbers gives the most % of prime numbers? While I am not an up-to-date programmer, I can use the excel macro 'program' fairly well. Using this I was able to put together a program to test combinations, but due to it being so slow, it would take 46 years to finish. My best find thus far has been 153 primes out of the 720 combinations, can anyone beat that?
bcp19 is offline   Reply With Quote
Old 2012-04-03, 19:15   #2
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

2·5·839 Posts
Default

Quote:
Originally Posted by bcp19 View Post
With the recent lotto fever, I got to thinking about a puzzle. Given 6 lotto numbers, 5 ranged 1-56 and 1 ranged 1-46(010203040501 to 525354555646), there are 720 combinations that each 6 number result can be arranged. What set of numbers gives the most % of prime numbers? While I am not an up-to-date programmer, I can use the excel macro 'program' fairly well. Using this I was able to put together a program to test combinations, but due to it being so slow, it would take 46 years to finish. My best find thus far has been 153 primes out of the 720 combinations, can anyone beat that?
16 primes under 56 ( 14 of which are under 46) really the only complexity is the less than 46 part the other part is \frac{16!}{5! \times 11!} the maximum below 46 left for any one of these is 11. then it's as simple as answer / 720 for all prime ( 100%) combinations.

Last fiddled with by science_man_88 on 2012-04-03 at 19:25
science_man_88 is offline   Reply With Quote
Old 2012-04-03, 19:37   #3
bcp19
 
bcp19's Avatar
 
Oct 2011

7·97 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
16 primes under 56 ( 14 of which are under 46) really the only complexity is the less than 46 part the other part is \frac{16!}{5! \times 11!} the maximum below 46 left for any one of these is 11. then it's as simple as answer / 720 for all prime combinations.
I don't think you understand the problem posed. Break it down to 3 numbers, and take numbers 1,3,6. Since the problem deals with single and double digit numbers, this is represented as 10306, 10603, 30106, 30601, 60103 and 60301 of which only 60103 is prime.
bcp19 is offline   Reply With Quote
Old 2012-04-03, 21:23   #4
axn
 
axn's Avatar
 
Jun 2003

23·673 Posts
Default

These are the 164 primes for 3,7,17,21,43,49. Not sure your problem specification allows for 49 to come in the last place.
Code:
30717432149
30717434921
30721431749
30721491743
31707214349
31707492143
31707494321
31721074349
31721074943
31743214907
31749214307
31749430721
32143174907
32149174307
32149430717
34317072149
34317210749
34317214907
34349170721
34349172107
34349210717
34349211707
34907211743
34907431721
34917210743
34921170743
34943072117
34943211707
70317434921
70317492143
70321174943
70321431749
70343491721
70349431721
70349432117
71721430349
71743032149
71743034921
71743214903
71749034321
72103491743
72117034943
72143034917
72143170349
72143490317
72149031743
72149170343
72149431703
74317492103
74321490317
74321491703
74349032117
74903172143
74903431721
74903432117
74917432103
74943031721
74943170321
74943210317
170307492143
170343210749
170343214907
170703214349
170721034349
170721494303
170743492103
170749034321
170749432103
172103494307
172149030743
174303074921
174303492107
174307034921
174307490321
174307492103
174349032107
174349072103
174903072143
174903210743
174907034321
174921070343
174943032107
210307174943
210307494317
210343174907
210343490717
210703174943
210703431749
210749031743
210749431703
211703074943
211703490743
211707034943
211707430349
211707434903
211743074903
211749034307
211749430307
214307031749
214307034917
214307174903
214317030749
214349170307
214903074317
214903174307
214903431707
214907031743
214943031707
214943071703
214943170307
214943170703
430307214917
430317490721
430321490717
430321491707
430349170721
430349210717
430703172149
430717210349
430721034917
430749032117
430749210317
431707034921
431721070349
431749030721
431749070321
432103071749
432103490717
432107031749
432107490317
432149031707
432149170307
432149170703
434903072117
434903170721
434907172103
434907210317
434917070321
434921071703
490307431721
490317210743
490317214307
490321174307
490343071721
490343170721
490343172107
490343210717
490703214317
490703431721
490717214303
490721031743
490721431703
490743031721
491707210343
491743030721
491743070321
492103430717
492107034317
492107431703
492117070343
494303172107
494303210717
494307031721
494317210307
axn is offline   Reply With Quote
Old 2012-04-03, 21:33   #5
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

2·5·839 Posts
Default

Quote:
Originally Posted by axn View Post
These are the 164 primes for 3,7,17,21,43,49. Not sure your problem specification allows for 49 to come in the last place.
Code:
30717432149
30717434921
30721431749
30721491743
31707214349
31707492143
31707494321
31721074349
31721074943
31743214907
31749214307
31749430721
32143174907
32149174307
32149430717
34317072149
34317210749
34317214907
34349170721
34349172107
34349210717
34349211707
34907211743
34907431721
34917210743
34921170743
34943072117
34943211707
70317434921
70317492143
70321174943
70321431749
70343491721
70349431721
70349432117
71721430349
71743032149
71743034921
71743214903
71749034321
72103491743
72117034943
72143034917
72143170349
72143490317
72149031743
72149170343
72149431703
74317492103
74321490317
74321491703
74349032117
74903172143
74903431721
74903432117
74917432103
74943031721
74943170321
74943210317
170307492143
170343210749
170343214907
170703214349
170721034349
170721494303
170743492103
170749034321
170749432103
172103494307
172149030743
174303074921
174303492107
174307034921
174307490321
174307492103
174349032107
174349072103
174903072143
174903210743
174907034321
174921070343
174943032107
210307174943
210307494317
210343174907
210343490717
210703174943
210703431749
210749031743
210749431703
211703074943
211703490743
211707034943
211707430349
211707434903
211743074903
211749034307
211749430307
214307031749
214307034917
214307174903
214317030749
214349170307
214903074317
214903174307
214903431707
214907031743
214943031707
214943071703
214943170307
214943170703
430307214917
430317490721
430321490717
430321491707
430349170721
430349210717
430703172149
430717210349
430721034917
430749032117
430749210317
431707034921
431721070349
431749030721
431749070321
432103071749
432103490717
432107031749
432107490317
432149031707
432149170307
432149170703
434903072117
434903170721
434907172103
434907210317
434917070321
434921071703
490307431721
490317210743
490317214307
490321174307
490343071721
490343170721
490343172107
490343210717
490703214317
490703431721
490717214303
490721031743
490721431703
490743031721
491707210343
491743030721
491743070321
492103430717
492107034317
492107431703
492117070343
494303172107
494303210717
494307031721
494317210307
as long as one of them is under 46 it's okay it seems.
science_man_88 is offline   Reply With Quote
Old 2012-04-03, 21:42   #6
axn
 
axn's Avatar
 
Jun 2003

23·673 Posts
Default

A few results above 150.
Code:
152 [3,11,13,17,27,29]
155 [1,3,7,9,17,31]
152 [3,11,19,21,27,31]
155 [9,17,21,23,27,31]
152 [1,3,7,9,29,31]
159 [1,7,11,21,29,31]
159 [3,7,9,21,27,33]
156 [7,19,21,27,29,33]
150 [9,19,21,23,31,33]
158 [1,3,11,23,29,37]
153 [9,11,19,23,29,37]
150 [7,9,17,27,31,37]
156 [1,11,17,27,31,37]
151 [1,9,23,29,31,37]
152 [1,3,21,29,33,37]
151 [11,13,19,23,29,39]
157 [1,13,23,27,33,39]
157 [3,17,29,31,33,39]
151 [7,11,13,21,37,39]
150 [1,13,23,27,37,39]
165 [3,7,11,31,37,39]
151 [9,11,31,33,37,39]
152 [3,7,9,13,21,41]
154 [9,11,13,19,23,41]
151 [9,13,21,23,27,41]
150 [3,11,17,27,31,41]
151 [1,13,19,27,33,41]
151 [7,9,11,29,33,41]
159 [3,13,27,31,33,41]
150 [1,3,21,33,37,41]
150 [19,27,31,33,37,41]
150 [1,3,9,23,39,41]
165 [3,11,13,27,39,41]
150 [7,19,27,33,39,41]
151 [1,3,13,17,27,43]
151 [7,11,17,19,27,43]
152 [1,3,11,17,29,43]
150 [3,11,17,19,31,43]
158 [1,3,11,29,31,43]
150 [1,7,13,21,33,43]
163 [7,17,19,29,33,43]
155 [1,3,7,13,37,43]
150 [3,7,17,29,37,43]
159 [1,13,19,29,37,43]
151 [9,13,21,29,37,43]
154 [1,21,27,31,37,43]
154 [7,17,29,31,37,43]
150 [1,11,13,17,39,43]
155 [3,7,17,19,39,43]
159 [3,19,21,23,39,43]
152 [1,9,23,33,39,43]
153 [13,27,29,33,39,43]
158 [1,9,13,27,41,43]
151 [1,3,7,29,41,43]
166 [9,13,23,37,41,43]
152 [1,9,29,37,41,43]
151 [1,11,13,19,21,47]
152 [11,19,21,23,27,47]
156 [1,7,11,19,31,47]
159 [1,3,17,19,31,47]
151 [3,17,19,23,33,47]
154 [1,3,21,29,33,47]
156 [11,17,27,29,33,47]
151 [3,17,27,31,33,47]
157 [9,17,19,23,37,47]
162 [3,17,23,31,37,47]
152 [3,9,17,21,39,47]
162 [1,17,27,33,39,47]
153 [3,21,29,33,39,47]
150 [3,13,17,27,41,47]
157 [1,13,27,31,41,47]
150 [11,17,29,33,41,47]
152 [1,13,31,39,41,47]
150 [1,31,37,39,41,47]
151 [7,13,21,33,43,47]
154 [1,19,27,33,43,47]
151 [7,21,27,33,43,47]
150 [1,7,29,33,43,47]
153 [1,11,33,37,43,47]
153 [1,3,7,13,21,49]
166 [1,3,7,21,23,49]
153 [7,11,13,21,23,49]
159 [3,7,13,23,27,49]
157 [1,13,23,27,29,49]
151 [3,7,21,29,31,49]
156 [3,9,19,21,33,49]
150 [3,7,19,29,33,49]
150 [1,17,21,31,33,49]
157 [1,9,11,33,37,49]
160 [3,17,21,33,37,49]
151 [1,9,21,27,39,49]
163 [1,21,29,33,39,49]
154 [1,3,19,21,41,49]
154 [13,19,21,29,41,49]
151 [3,7,19,33,41,49]
166 [1,3,17,37,41,49]
164 [3,7,17,21,43,49]
155 [1,17,21,29,43,49]
155 [11,21,29,31,43,49]
150 [1,11,23,37,43,49]
169 [1,3,31,37,43,49]
153 [1,13,37,41,43,49]
150 [1,7,13,19,47,49]
152 [9,11,19,37,47,49]
152 [7,13,17,21,27,51]
150 [3,17,19,23,27,51]
160 [1,9,11,23,29,51]
156 [3,7,9,23,31,51]
151 [3,17,21,23,31,51]
151 [7,9,17,23,33,51]
158 [1,3,19,27,33,51]
153 [9,21,23,27,33,51]
150 [3,11,19,31,33,51]
152 [3,7,9,17,37,51]
162 [3,17,21,23,37,51]
155 [3,7,23,31,37,51]
153 [17,19,27,31,37,51]
157 [9,17,19,33,37,51]
163 [7,9,17,23,39,51]
150 [3,11,23,33,39,51]
165 [9,11,19,37,39,51]
155 [9,13,23,37,39,51]
152 [1,3,7,27,41,51]
153 [1,19,29,31,41,51]
154 [3,9,11,33,41,51]
156 [9,11,23,37,41,51]
153 [1,9,27,37,41,51]
161 [13,21,27,37,41,51]
151 [9,21,27,39,41,51]
155 [1,7,19,27,43,51]
163 [1,9,27,29,43,51]
153 [7,9,11,37,43,51]
155 [1,11,17,19,47,51]
152 [3,13,21,29,47,51]
156 [13,27,31,33,47,51]
151 [19,23,31,37,47,51]
152 [19,21,23,39,47,51]
166 [7,9,13,23,49,51]
151 [7,11,19,29,49,51]
158 [1,13,21,29,49,51]
153 [7,19,27,31,49,51]
150 [3,21,33,37,49,51]
150 [9,27,33,37,49,51]
150 [17,31,37,41,49,51]
152 [1,17,23,47,49,51]
162 [1,7,9,13,21,53]
167 [1,7,11,19,27,53]
152 [3,9,11,21,27,53]
152 [3,11,19,23,31,53]
153 [1,9,13,27,33,53]
151 [3,7,17,29,33,53]
150 [3,19,27,29,33,53]
153 [1,9,11,23,37,53]
156 [1,7,11,23,39,53]
150 [1,13,23,29,39,53]
155 [1,3,27,29,39,53]
159 [1,11,31,37,39,53]
151 [1,17,31,37,39,53]
159 [9,23,33,37,39,53]
151 [7,9,23,27,41,53]
150 [11,17,23,39,41,53]
153 [13,21,27,39,41,53]
159 [3,11,31,39,41,53]
152 [3,21,23,27,43,53]
151 [1,17,21,29,43,53]
151 [9,11,29,33,43,53]
156 [3,21,31,33,43,53]
154 [9,11,17,37,43,53]
155 [1,19,29,39,43,53]
153 [11,23,37,39,43,53]
153 [11,17,19,41,43,53]
153 [1,3,7,19,47,53]
150 [7,13,17,21,47,53]
151 [1,3,27,29,47,53]
156 [1,19,31,37,47,53]
165 [9,11,19,39,47,53]
150 [1,19,37,39,47,53]
155 [1,9,31,43,47,53]
155 [23,29,37,43,47,53]
155 [3,17,21,27,49,53]
155 [7,21,27,39,49,53]
152 [7,19,27,47,49,53]
155 [19,21,37,47,49,53]
154 [3,7,41,47,49,53]
150 [1,7,17,19,51,53]
156 [3,7,11,27,51,53]
151 [3,7,19,31,51,53]
152 [7,11,23,37,51,53]
159 [11,19,23,37,51,53]
156 [7,17,37,41,51,53]
152 [9,23,37,41,51,53]
159 [1,23,37,43,51,53]
151 [1,11,19,47,51,53]
axn is offline   Reply With Quote
Old 2012-04-03, 23:06   #7
bcp19
 
bcp19's Avatar
 
Oct 2011

10101001112 Posts
Default

Quote:
Originally Posted by axn View Post
These are the 164 primes for 3,7,17,21,43,49. Not sure your problem specification allows for 49 to come in the last place.
As sm_88 said, as long as 1 number is below 46 it works. 3,7,17,21,49,43 is the same as what you have, but in a different order. I notice you have no even numbers in any of your solutions, did you only do odd numbers or something? I did see a 167 in there, which beats the 159 I just ran across.

Also, you seem to have missed 1,3,9,17,53,3 which was my 159. I don't think you realized that the 6th number can be a duplicate.

Last fiddled with by bcp19 on 2012-04-03 at 23:11
bcp19 is offline   Reply With Quote
Old 2012-04-04, 01:01   #8
axn
 
axn's Avatar
 
Jun 2003

23×673 Posts
Default

Quote:
Originally Posted by bcp19 View Post
As sm_88 said, as long as 1 number is below 46 it works. 3,7,17,21,49,43 is the same as what you have, but in a different order. I did see a 167 in there, which beats the 159 I just ran across.
There is also a 169 there

Quote:
Originally Posted by bcp19 View Post
Also, you seem to have missed 1,3,9,17,53,3 which was my 159. I don't think you realized that the 6th number can be a duplicate.
Hmmm.. Do you by chance count the same prime twice? BTW, quick check gives 126/2=63 primes for 1,3,9,17,53,3

Quote:
Originally Posted by bcp19 View Post
I notice you have no even numbers in any of your solutions, did you only do odd numbers or something?
I wasn't doing exhaustive search -- merely "good" enough. The strategy was that I didn't want any combinations that would narrow down the potential combinations too much. That means no duplicates, and no numbers that end in 0,2,4,6,8,5. This cut down the search space so that I could do an exhaustive search.
axn is offline   Reply With Quote
Old 2012-04-04, 03:12   #9
bcp19
 
bcp19's Avatar
 
Oct 2011

7×97 Posts
Default

Quote:
Originally Posted by axn View Post
There is also a 169 there


Hmmm.. Do you by chance count the same prime twice? BTW, quick check gives 126/2=63 primes for 1,3,9,17,53,3



I wasn't doing exhaustive search -- merely "good" enough. The strategy was that I didn't want any combinations that would narrow down the potential combinations too much. That means no duplicates, and no numbers that end in 0,2,4,6,8,5. This cut down the search space so that I could do an exhaustive search.
Hmmm, I need to check my transposition worksheet then, I had set up 720 rows where I insert the 6 numbers in the top row and it automatically transposed the digits for all combinations, the 7th column cell formula multiplied the first 6 to get the number, the the IsPrime function I defined would produce 1 for true and 0 for false, so a simple sum gave me total. I did not stop to think about the double # creating 1/2 the primes, but that definitely shows something is wrong if I have a odd number of primes from a double number.
bcp19 is offline   Reply With Quote
Old 2012-04-06, 11:07   #10
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

3,347 Posts
Default

Quote:
Originally Posted by bcp19 View Post
With the recent lotto fever, I got to thinking about a puzzle. Given 6 lotto numbers, 5 ranged 1-56 and 1 ranged 1-46(010203040501 to 525354555646)
I understand this as the 1-46 number can be a duplicate of one of the 5 1-56 numbers? If this is correct the highest one is 204 primes with: 3,19,23,31,33 and 33
2nd highest is 194 primes with: 7,9,31,37,49 and 7.

It took 19 hours to search the entire 46*56*55*54*53*52/(1*2*3*4*5) = 175,711,536 combinations with a quick program not really optimized and while gaming on the computer as well.

If duplicates is not allowed the 169 primes from axn is the highest.
ATH is offline   Reply With Quote
Old 2012-04-06, 14:03   #11
axn
 
axn's Avatar
 
Jun 2003

23·673 Posts
Default

Quote:
Originally Posted by ATH View Post
I understand this as the 1-46 number can be a duplicate of one of the 5 1-56 numbers? If this is correct the highest one is 204 primes with: 3,19,23,31,33 and 33
2nd highest is 194 primes with: 7,9,31,37,49 and 7.
The last one can be a duplicate. But the question is, are duplicate primes allowed? Because, out of the 204 (or 194) primes, only 102 (resp 97) are unique.
axn is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mersenne Primes p which are in a set of twin primes is finite? carpetpool Miscellaneous Math 4 2022-07-14 02:29
Distribution of Mersenne primes before and after couples of primes found emily Math 34 2017-07-16 18:44
A conjecture about Mersenne primes and non-primes Unregistered Information & Answers 0 2011-01-31 15:41
Lotto dilemma Unregistered Information & Answers 17 2010-10-06 22:06
possible primes (real primes & poss.prime products) troels munkner Miscellaneous Math 4 2006-06-02 08:35

All times are UTC. The time now is 02:29.


Mon Aug 8 02:29:49 UTC 2022 up 31 days, 21:17, 1 user, load averages: 1.45, 1.31, 1.25

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔