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

  • Art is the new prozac random shit
  • The internet of (hacked) things computers are evil
  • On compliance geek
  • Sounds about right random shit
  • Your phone wants your braaaaaaaaains computers are evil
  • Grindin’ geek

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

The man gave a shrug which indicated that, although the world did indeed have many problems, this was one of them that was not his.
--(Terry Pratchett, Soul Music)

Random Posts

  • Weekend update
  • Bean on the bus
  • Morning after
  • Swiss wine consumption declines to 40 bottles per person
  • Going double-digital
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