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

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?

  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Facebook (Opens in new window) Facebook
  • Share on Threads (Opens in new window) Threads
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email
uncategorized Tags:geek, random shit

Post navigation

Previous Post: I call Bullshit!
Next Post: Random dialogue of the day

Related Posts

  • Blergh random shit
  • Science coming out of left field random shit
  • Geek pick-up lines geek
  • Events conspire to give me a message geek
  • So much innuendo possibility… pictures
  • Bark! Bark! Bark! not Bork! Bork! Bork! random shit

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

Sam Vimes could parallel process. Most husbands can. They learn to follow their own line of thought while at the same time listening to what their wives say. And the listening is important, because at any time they could be challenged and must be ready to quote the last sentence in full. A vital additional skill is being able to scan the dialogue for telltale phrases such as "and they can deliver it tomorrow" or "so I've invited them for dinner?" or "they can do it in blue, really quite cheaply."
--(Terry Pratchett, The Fifth Elephant)

Random Posts

  • London – day 2 – St-James park, Buckingham palace, Leicester Square
  • A weekend update on the pet situation
  • Last night, this morning
  • Well that’s original
  • Must do this!!
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 © 2026 The beaver is a proud and noble animal.

Powered by PressBook Premium theme