Skip to content
The beaver is a proud and noble animal

The beaver is a proud and noble animal

Notes from a bemused canuck

  • Home
  • About
  • Bookmarks
  • Pictures
  • Resume
  • Wine
  • Random Recipe
  • Toggle search form

Day: September 14, 2009

Any number theorists out there?

Posted on September 14, 2009 By admin

Based on Derren Brown’s magical formula to win on the lottery, I hacked together a little bit of code to try and win the upcoming EuroMillion draw (yes, I know I’m sad).

The code generates random tickets with 5 unique numbers between 1 and 50 and 2 potentially non-unique numbers between 1 and 9. For example:

Ticket{numbers=[1, 14, 17, 21, 28], stars=[5, 2]}
Ticket{numbers=[2, 6, 8, 25, 43], stars=[1, 2]}
Ticket{numbers=[12, 23, 30, 36, 41], stars=[5, 4]}
Ticket{numbers=[8, 19, 28, 37, 41], stars=[5, 9]}
Ticket{numbers=[6, 20, 22, 28, 30], stars=[5, 6]}
Ticket{numbers=[2, 3, 33, 36, 40], stars=[9, 2]}
Ticket{numbers=[20, 26, 30, 39, 50], stars=[6, 5]}
Ticket{numbers=[11, 13, 22, 30, 38], stars=[3, 6]}
Ticket{numbers=[10, 14, 17, 45, 47], stars=[8, 7]}

You’ll notice that the numbers are sorted in increasing order, except for the stars. If you then take the average of the numbers at each position, you’ll get the “winning” number, or so the magic goes.

The interesting bit though, which I’m curious about, is that if you generate more than 100 or so tickets in one go, the average is always the same. Why is this, and does it make sense?

uncategorized

Power to the beaver!

Show me the beaver!
September 2009
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  
« Aug   Oct »

Quote of the day

A good bookshop is just a genteel Black Hole that knows how to read.
--(Terry Pratchett, Guards! Guards!)

Random Posts

  • God bless america, land of the pollution-free naps
  • I missed my kitty!
  • Another icon for those who might want it
  • Weekend started badly but ended fairly well
  • Hollywood is finally out of ideas
reading leopard

Tags

bobble the little blue owl boobies brought to you by the fda cats chonk christmas comics computers are evil covid-19 dealing with idiots dilbert dog ducks galleries geek god bless the land of the free holidays house I am Canadian land of cheese and chocolate linked news lolcat london news from the stupid not my dog nsfw pets pictures potd2014 qotd random shit re-member recipes relationship shrill slice of life stress Tao the british way The Peanut things i miss travel video wine work

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2025 The beaver is a proud and noble animal.

Powered by PressBook Premium theme