## Winning the Lottery

Posted by Karl Sharman on December 6, 2010 – 4:38 am

Professor Slavy buys a lottery ticket, which requires that he pick six different integers from 1 through 46, inclusive.

He chooses his numbers such that the sum of the base-ten logarithms of his six numbers is an integer.

It so happens that the integers on the winning lottery ticket have the same property- the sum of the base-ten logarithms is an integer.

What is the probability that Prof. Slavy holds the winning ticket?

December 6th, 2010 at 11:01 am

I’ll say the probability of Prof Slavy holding the winning ticket is 1 in 9. The possible base-ten logarithm sums for the 6 integers would be 1 through 9, so 9 possibilities.

December 6th, 2010 at 11:14 am

Hi Spyder, that’s not even slightly close.

Hi Karl, very good (but fiddly) problem. I hope too have done it soon.

December 6th, 2010 at 12:15 pm

Spyder, i see where you are coming from. 6*log(46,10) < 10, so the maximum integer that could be attained by adding any 6 logs is 9. however, the question is more of: how many combinations of 6 different logs can be added to get an integer…

looks like a job for a computer to figure out.. I'll let someone else do it.

December 6th, 2010 at 12:34 pm

Very wise choice DP. It was quite tedious;)

Here’s my analysis:

Let the numbers be s1, s2, s3, s4, s5 and s6, and let the product be S.

Let I = log(S), where I is an integer. Then S = 10^I.

But 10 = 2*5. So the only possible lottery numbers that can be selected

must have factors of 1, 2 and 5 (and no other prime factors).

This means that the only possible numbers that can be selected are:

1, 2, 4, 5, 8, 10, 16, 20, 25, 32 and 40

Using [m,n] to denote 2^m * 5^n

(from now on I’ll refer to m’ and n’s for brevity)

The allowable numbers may be written as

[0,0],[1,0],[2,0],[0,1],[3,0],[1,1],[4,0],[2,1],[0,2],[5,0],[3,1]

nb 3 are of the form [0,?], 2 are [1,?], 2 are [2,?]

For each product of 6 numbers, the number of 2’s must = number of 5’s.

i.e. The sum of the m’s = sum of the n’s in the product of the [m,n]’s

(The algebra is [a,b]*[c,d] = [a+c,b+d])

That looks like a lot of trial and error. Sorting the numbers

by m and n (then sub-sorting by the other) =>

[0,0],[0,1],[0,2],[1,0],[1,1],[2,0],[2,1],[3,0],[4,0],[2,1],[5,0]

[0,0],[1,0],[2,0],[3,0],[4,0],[5,0],[0,1],[1,1],[2,1],[3,1],[0,2]

The lowest sum for m is 0+0+0+1+1+2 = 4 (and then sum n = 4)

The lowest sum for n is 0+0+0+0+0+0 = 0 (and then sum m = 15)

So minimum m = n = 4

The highest sum for m is 2+2+3+3+4+5 = 19 (and then sum n = 0)

The highest sum for n is 0+1+1+1+1+2 = 6 (and then sum m = 6)

So maximum m = n = 6

So m = n = 4,5,6 (at worst), where the 5 is a guess.

When m = n = 4 we get S = [0,0]*[0,1]*[0,2]*[1,0]*[1,1]*[2,0]

= 1*5*25*2*10*4 = 1*2*4*5*10*25 as the only solution

When m = n = 6 we get S = [5,0]*[0,1]*[1,1]*[2,1]*[3,1]*[0,2]

= 32*5*10*20*40*25 = 5*10*20*25*32*40 as the only solution

When m = n = 5 get by considering the n’s we have the constraint that we

must use [0,1],[1,1],[2,1],[3,1],[0,2] => [6,0] so that can’t be done.

If I haven’t had a brain cramp, the only compliant lottery numbers are:

1,2,4,5,10,25 and 5,10,20,25,32,40.

Of course this is a trick question (otherwise I’d say 1/2 for slavy’s chances).

Slavy’s probability of choosing the right numbers is:

(6! * 40!)/46! or 1 in 9 366 819, as it is for anyone.

December 6th, 2010 at 12:39 pm

..aaarghh. small typo. Third para from end should have read

When m = n = 5 get by considering the n’s we have the constraint that we

must use [0,1],[1,1],[2,1],[3,1],[0,2] => [6,6] so that can’t be done.

But I did have a brain cramp, I used the m = n = 6 instead of 5. I’ll amend the last bit for m = n = 5 in a short while.

December 6th, 2010 at 12:54 pm

When m = n = 5 get by considering the n’s we have the constraint that we must use

[0,2], any 3 of [0,1],[1,1],[2,1],[3,1] and any 2 of [0,0],[1,0],[2,0],[3,0],[4,0],[5,0]

[1,1][2,1][3,1][0,2] = [6,5], no good

[0,1][2,1][3,1][0,2] = [5,5], no good

[0,1][1,1][3,1][0,2] = [4,5], so use [0,0] and [1,0] => 1,2,5,10,40,25

[0,1][1,1][2,1][0,2] = [3,5], so use [0,0],[2,0] => 1,4,5,10,20,25

If I haven’t goofed again, the only compliant lottery numbers are:

1,2,4,5,10,25; 5,10,20,25,32,40; 1,2,5,10,40,25 and 1,4,5,10,20,25

Goota serve dinner up now.

December 6th, 2010 at 1:26 pm

So piggy-backing off of post #6 by Chris, the answer would be 1 in 4, since he did infact pick sich numbers that fit the criteria.

I’m sure glad i didn’t have to do all the work, and would award Chris all the points and gold stars if that is infact the correct answer.

December 6th, 2010 at 1:26 pm

such*

December 6th, 2010 at 1:39 pm

… which it probably isn’t.

I am struck by the different philosophy that I’m using when answering this to when dealing with that run of coin flips etc. Yep, I forgot to say the other probability would be 1 in 4, given that we are only considering lotteries which “comply” and given that slavy always uses the complying strategy.

December 6th, 2010 at 2:04 pm

I can’t be bothered to check it again, as I’m sure that the basic approach was more or less right. To me that’s more important than actually getting the right answer. I’m dying to know if slavy has got a fancy way of doing it. Whwn I started, I thought that the binomial theorem might rear it’s face.

I didn’t mention that I had used the fundamental theorem of arithmetic to make my initial assertion that only 1, 2 and 5 could be factors of the numbers. I’m not sure if Euclid’s Lemma would suffice.

December 6th, 2010 at 5:33 pm

Prof. Slavy is very happy with your generosity, Chris and hopes that you run a lottery some day and give me the expected share However, he had only 1/32 chance to win some money but (it depends how long he writes now and how fast the others are) a good chance to win the prize for the first correct answer

Post #4 is very nice from Chris so I will use it. The approach afterwards is not the best one in my oppinion. After having all the 12 possible couples of powers for 2 and 5, I prefer to compute the differences m-n for each one. We derive one time 5, one time 4, one time 3, two times 2, two times 1, two times 0, one time -1, one time -2, and one time -3. We want to find all the possible different 6-tuples of numbers among them, that sum up to 0. There might be some trick/formula to use here (at least 32=2^5 looks suspicious since only the two prime numbers involved in the problem are used), but it is late now, so I will just use brute force and go to bed. Since the smallest sum of 5 non-negative numbers is 0+0+1+1+2=5>3, there is no chance to use only 1 negative number among the six numbers. Assume we use exactly two negative numbers. If we take -1 and -2, then we can only take 2+1+0+0=3 for the remainging four which gives rise to 4 different solutions (we have two different 2s and two different 1s that we can group however we want). If we take -1 and -3 we need to use either the unique solution (2,2,0,0), or the double ones (2,1,1,0) and (3,1,0,0). So in this case we have 5 solutions in total. For -2 and -3 we have either the doubles (4,1,0,0), (3,1,1,0), and (3,2,0,0), or the four-time possible (2,2,1,0). So, in this case we have 10 solutions in total. Last, but not least, let us use all the three negative numbers -1, -2 and -3. Then we need one of the following options:

(5,1,0) – 4 different ways

(4,1,1) – 1 different way

(4,2,0) – 4 different ways

(3,2,1) – 4 different ways

or in total 13 different solutions.

Overall we have: 4+5+10+13=32 different 6-tuples.

December 6th, 2010 at 5:38 pm

And of course the mistake is mine Have I told you that I hate arithmetics? So, Chris is actually correct and we have only the 4 possibilities from the first case (taking -1 and -2), because 5^3=125>46 and we don’t have any (0,3) pair. Basically the whole previous post is a big bullshit

December 6th, 2010 at 5:44 pm

LOL, thanks for retracting slavy. While I knew I might have dropped a clanger, I hadn’t thought it could have been from Big Ben.

Are you really, really sure I got the only 4 numbers?

All the same, I’m going to try to follow what you doing.

December 6th, 2010 at 5:45 pm

Well, you just need to follow the very first and only case. The rest is garbage, since we dont have -3 at all. And, yes, I am sure that you got it right. Good night now

December 6th, 2010 at 5:48 pm

I also apologise to everyone – my explanatory material was a overly concise, I introduced unnecessary variables, I didn’t use a completely consistent notation and I didn’t tidy it up adequately before hitting the submit button.

December 7th, 2010 at 11:53 am

Well, I hoped the probability question here would be a little different for Chris and his recent probability questions, but he worked through it and came up with 1 in 4 chance, and explained it well.

I don’t know of any neater way of doing it other than hard graft! If Slavy doesn’t, then I concede there is no better way!

December 7th, 2010 at 12:28 pm

Hi Karl. Thanks for the problem, it made a change. Neither slavy or I are saying there isn’t a neater solution – but I expect that a neater solution, nay actually have been more difficult in view of the actual number of cases that had to be examined. The best I could do, towards shrinking the prole, was to restrict the number of possible combinations (to wit, the m = n = 4,5,6 stuff).

November 14th, 2015 at 11:33 pm

If the definition is changed and supplemented, I can solve this. If you do a Summation Notation of n where the upper limit is the Mersenne Prime, you’ll end up with the same values. If the upper limit is 127 the value is 8128 which is factored to 2^6*127, a perect number.If you do 4^n/2 in a summation you’ll end up with a 3 in base 4. So if you do the first summation with one of my primes (43), you’ll end up with 946 which is 2*11*43. The two is extra, but the 11 is found with my formula -1. If you do another formula you’ll end up with a prime of 174763 which has a summation of 15271140466 and that is factored to 2*43691*174763. Once again the 2 is extra and the 43691 is my -1 function. There is a problem with this. For it to get the prime and the prime before it, both have to be prime. Otherwise you’ll get a prime and a factor of the -1 function.I have 18 primes so far up to the 99th term. Btw, there is a very distinct pattern to this formula. I’m pretty sure it’s possible to detect every prime if you use a cubic formula. But I could be wrong.

July 14th, 2016 at 7:26 pm

Can you tell me plz how can it derived from this, last day 341055 today itself the results is 166441.. .