A personal post from Graham Ellis
Lisa and Graham live in Melksham, Wiltshire, England

Home Accessibility Our Courses Our Hotel The Mouth Chamber Resources Trains! About Us Contact
 
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Patterns in numbers - room occupancy

I have often spotted patterns in the room numbers we have occupied - describing a night where 1, 3 and 5 are occupied but 2 and 4 are not as "odd" for example, and I have been surprised at how often the let combination allows me to come up with some such form of wording. I woke ... dawn is early at the moment ... and wondered just how many of the occupancy patterns could be met be a short description. And what better way to generate the pattern than a Python program ;-)

nrooms = 5
for room in range (2 ** nrooms):
  print "occupied:",
  for df in range(nrooms):
    pw = 2 ** df
    if room / pw % 2 == 1:
      print df+1,
  print


And the results?

occupied: "empty"
occupied: 1 "singular"
occupied: 2
occupied: 1 2 "bottoms"
occupied: 3 "one in the middle"
occupied: 1 3
occupied: 2 3
occupied: 1 2 3 "lowers"
occupied: 4 "factosisable"
occupied: 1 4 "squares"
occupied: 2 4 "even"
occupied: 1 2 4 "powers of 2"
occupied: 3 4
occupied: 1 3 4
occupied: 2 3 4 "middles"
occupied: 1 2 3 4 "top missing"
occupied: 5 "just the top"
occupied: 1 5 "extreme"
occupied: 2 5
occupied: 1 2 5
occupied: 3 5
occupied: 1 3 5 "odd"
occupied: 2 3 5 "prime"
occupied: 1 2 3 5 "Fibonacci"
occupied: 4 5 "tops"
occupied: 1 4 5
occupied: 2 4 5
occupied: 1 2 4 5 "hole in th middle"
occupied: 3 4 5 "uppers"
occupied: 1 3 4 5
occupied: 2 3 4 5 "non-singular"
occupied: 1 2 3 4 5 "full"

Hmm .. the majority (but not all) do describe to a pattern!
(written 2009-05-13)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Z800 - Whimsy
  [24] Impossible terms - (2004-08-22)
  [39] A Change is as good as a rest - (2004-09-05)
  [44] Serious subject - (2004-09-10)
  [69] John Toner - (2004-10-01)
  [94] Special change - (2004-10-20)
  [151] Coffee Standards - (2004-12-14)
  [156] Signage - (2004-12-18)
  [300] Dentist's Waiting Room Syndrome - (2005-05-04)
  [331] 08:45 is a difficult time - (2005-05-31)
  [346] No Smoking Pubs - (2005-06-13)
  [395] Making Orangutangs - (2005-07-28)
  [520] Three life changing comments - (2005-12-07)
  [547] Taking the dog for a walk - (2005-12-29)
  [568] NB ''Aspiration'' - (2006-01-18)
  [610] Need a hankie - (2006-02-16)
  [661] Dressed up for a phone call - (2006-03-29)
  [689] The call of nature - (2006-04-18)
  [701] Minature Cyclists only - limited headroom - (2006-04-27)
  [758] Very good for woodlice - (2006-06-12)
  [761] Great new inventions - (2006-06-14)
  [784] Which way to turn? - (2006-06-28)
  [807] Telling large from small - (2006-07-18)
  [850] Lighter moments - (2006-08-31)
  [892] A pattern in change - (2006-10-12)
  [973] Too much used to Skype - (2006-12-08)
  [1075] I'm not the father - (2007-02-11)
  [1167] Leaning tower of Cheeser - (2007-04-28)
  [1171] Traffic light control for horses - (2007-05-01)
  [1241] If I say 'I am fine', what do I mean? - (2007-06-23)
  [1440] Useful command or messy screen? - (2007-11-21)
  [1604] M25 / South Mimms Service Area - (2008-04-07)
  [1662] Westonbirt Arboretum Postcode - (2008-05-31)
  [1886] Keys to friendless churches - (2008-11-15)
  [1952] Small Print - (2008-12-19)
  [1977] Going round the block - (2009-01-04)
  [1980] Michelle - (2009-01-06)
  [1988] Melksham, Wiltshire. Town Crier Competition, 2009 - (2009-01-11)
  [2009] The Royal Mail Receipt - (2009-01-26)
  [2028] Things people say on the phone - (2009-02-06)
  [2050] Why the Pony Tail? - (2009-02-21)
  [2089] The Longest Day - Wednesday, 28th September - (2009-03-18)
  [2108] Funny Amusing, Funny Amazing and The Smarts - (2009-03-29)
  [2127] Call in the professionals! - (2009-04-12)
  [2131] Patterns in street names - (2009-04-17)
  [2138] Ski bore ... train bore ... dog bore - (2009-04-24)
  [2143] Throughout the year, around the world - (2009-04-27)
  [2152] My four feet! - (2009-05-01)
  [2157] From the 51773 family - (2009-05-04)
  [2250] Bluegrass comes to Melksham - (2009-06-19)
  [2251] Over a third of numbers start with the digit 1 - (2009-06-19)
  [2256] Is it Python past cheetah already? - (2009-06-24)
  [2397] Signwriting is dead. Long live the sign. - (2009-09-06)
  [2496] A better design of mouth - (2009-11-07)
  [2542] My armpit was like a zebra crossing - (2009-12-19)
  [2626] On Malachite Green - (2010-02-06)
  [2676] Changing Times - (2010-03-13)
  [2945] Last, final, etc - (2010-09-04)
  [3030] Liquorice allsorts and Dolly Mixtures - (2010-11-05)
  [3203] Melksham Town Council announces ... - (2011-03-16)
  [3215] Solution looking for problem - (2011-03-27)
  [3223] Answering at my earliest convenience - (2011-03-29)
  [3226] A busy morning for railway announcements - (2011-04-01)
  [3288] Random Questions ... - (2011-05-14)
  [3369] Local Council leads bans on many activities - (2011-07-24)
  [3462] Hangers, luggage and possessions - (2011-10-01)
  [3738] Adoptive homes sought for abandoned babies - (2012-05-20)
  [3851] Who is this? Picture Puzzle - (2012-08-28)
  [3868] How to make an ohno cake - (2012-09-23)
  [3912] Sand to Arabia, Coals to Newcastle or Woodburners to Russia - (2012-11-04)
  [3922] Twerp - A person regarded as insignificant and contemptible - (2012-11-12)
  [4067] The woman, the television, the bullock and Darlington - (2013-04-23)
  [4329] Does Santa Claus need a CRB check? - (2014-11-25)
  [4392] Interview conditions,and other instructions to staff - (2015-01-12)


Back to
Offers that I can refuse
Previous and next
or
Horse's mouth home
Forward to
You cannot please all of the people all of the time
Some other Articles
Choosing the right version of Java and Tomcat
Servlet life cycle, and Java Servlet variable scope
What Linux run level am I in?
You cannot please all of the people all of the time
Patterns in numbers - room occupancy
Offers that I can refuse
Melksham Candidates for Wiltshire Unitary Election
Preventing forum spam - checks at sign up
Balloon Journey in Wiltshire
Melksham in pictures
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2180_Pat ... pancy.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb