<?xml version="1.0" encoding="UTF-8" ?>
  <resource>
  <id>7024</id>
  <path>/www/nrich/html/content/id/7024/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-02-01T00:00:01</last_published>
  <indexXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;p style=&quot;color:#888; font-size:0.8em;&quot;&gt;Note: if you have an iPod Touch, iPhone, or iPad, or have Safari on your phone, there&amp;#39;s a webapp called &lt;a href=&quot;http://nrich.maths.org/iphone/apps/LightDelights/index.html&quot; target=&quot;_blank&quot;&gt;&amp;#39;Light Delights&amp;#39;&lt;/a&gt; that you can use instead of the machine below.&lt;/p&gt;
&lt;br&gt;&lt;/br&gt;
Charlie has a delightful machine with four coloured lights on it.&lt;br&gt;&lt;/br&gt;
You can enter numbers into Charlie&amp;#39;s machine. Each light is controlled by a rule, and if your number satisfies the rule, the light will go on. Some numbers may turn on more than one light!&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Type in some numbers and see which lights you can switch on.&lt;br&gt;&lt;/br&gt;
To start again with a new set of rules, click the Restart button.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div style=&quot;background-color:#000;padding:20px;padding-bottom:20px;width:260px;height:280px&quot;&gt;

	&lt;div style=&quot;position:relative;&quot;&gt;
		&lt;label style=&quot;position:absolute;top:10;color:#fff;font-size:12px;font-family:helvetica,arial,sans-serif&quot;&gt;Type in a number&lt;/label&gt;
		
		&lt;input id=&quot;numberText&quot; type=&quot;text&quot; value=&quot;0&quot; name=&quot;number&quot; tabindex=&quot;1&quot; maxlength=&quot;8&quot; size=&quot;8&quot;  style=&quot;position:absolute;top:-10px;left:130px;font-size:1.2em&quot; /&gt;
		
		&lt;img id=&quot;red&quot; src=&quot;red.png&quot; style=&quot;position:absolute;left:20px;top:30px;opacity:0;z-index:1&quot; /&gt;
		&lt;img id=&quot;redOff&quot; src=&quot;redOff.png&quot;
style=&quot;position:absolute;left:20px;top:30px;opacity:1;z-index:0&quot; /&gt;

		&lt;img id=&quot;yellow&quot; src=&quot;yellow.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:0;z-index:1&quot; /&gt;
		&lt;img id=&quot;yellowOff&quot; src=&quot;yellowOff.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:1;z-index:0&quot; /&gt;

		&lt;img id=&quot;green&quot; src=&quot;green.png&quot; style=&quot;position:absolute;left:20px;top:130px;opacity:0;z-index:1&quot; /&gt;
		&lt;img id=&quot;greenOff&quot; src=&quot;greenOff.png&quot; style=&quot;position:absolute;left:20px;top:130px;opacity:1;z-index:0&quot; /&gt;

		&lt;img id=&quot;blue&quot; src=&quot;blue.png&quot; style=&quot;position:absolute;left:120px;top:130px;opacity:0;z-index:1&quot; /&gt;
		&lt;img id=&quot;blueOff&quot; src=&quot;blueOff.png&quot; style=&quot;position:absolute;left:120px;top:130px;opacity:1;z-index:0&quot; /&gt;

	    &lt;input id=&quot;restartButton&quot; name=&quot;restartButton&quot; type=&quot;button&quot; value=&quot;Restart&quot; style=&quot;position:absolute;top:260px&quot; /&gt;    

		&lt;br style=&quot;clear:both&quot; /&gt;
	&lt;/div&gt;	
&lt;/div&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;strong&gt;Can you develop a strategy to work out the rules controlling each light?&lt;/strong&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
What is special about a rule where all the &amp;#39;light on&amp;#39; numbers&lt;br&gt;&lt;/br&gt;
&lt;ul&gt;
&lt;li&gt;are odd?&lt;/li&gt;
&lt;li&gt;are even?&lt;/li&gt;
&lt;li&gt;are a mixture of odd and even?&lt;/li&gt;
&lt;/ul&gt;
Now explore how to turn on several lights at once in the problem &lt;a href=&quot;/7016&quot;&gt;A Little Light Thinking&lt;/a&gt;.&lt;br&gt;&lt;/br&gt;
You may also like to try &lt;a href=&quot;/6713&quot;&gt;Shifting Times Tables&lt;/a&gt;.&lt;/mdoxml&gt;</indexXML>
  <solutionXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;span class=&quot;editorial&quot;&gt;Hannah from Wallington High School for Girls suggested a possible starting point:&lt;/span&gt;&lt;br&gt;&lt;/br&gt;
A strategy is to perhaps type in a number one by one so start with 1 then&lt;br&gt;&lt;/br&gt;
2,3,4 etc and recording each light that gets turned on.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span class=&quot;editorial&quot;&gt;The Year 9 Puzzle Club at Huddersfield Grammar School worked out their machine&amp;#39;s rules as follows:&lt;/span&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
We wrote down which lights lit up for numbers 1-45, then wrote down the sequences for each colour.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Yellow: 1, 11, 21, 31, 41...&lt;br&gt;&lt;/br&gt;
Blue: 11, 22, 33, 44...&lt;br&gt;&lt;/br&gt;
Green: 10, 21, 32, 43...&lt;br&gt;&lt;/br&gt;
Red: 4, 10, 16, 22, 28...&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Then we worked out the Nth term of each sequence.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Yellow: 10N+1&lt;br&gt;&lt;/br&gt;
Blue: 11N&lt;br&gt;&lt;/br&gt;
Green: 11N-1&lt;br&gt;&lt;/br&gt;
Red: 6N-2&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span class=&quot;editorial&quot;&gt;Dylan, from Landau Forte, told us his findings:&lt;/span&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
I found out that yellow started on 3 and I had to add 3 each time. All the numbers were a mixture of odd and even. Next, red started on 7 and I had to add 7 each time. The rule was all the numbers were a mixture of odd and even. Then blue started on 4 and I had to add 9 each time. The rule for this one was also that the numbers were odd and even. Finally green started on 3 and I had to add 4 each
time. The rule for this was that all the numbers were odd.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;span class=&quot;editorial&quot;&gt;Laurynne from Wallington pointed out that if the sequence has the rule $an+b$ with $a$ and $b$ both even, the terms will all be even, but if $a$ is even and $b$ is odd, the terms will all be odd.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Aswaath, from Garden International School, tested the machine in the same way, but gave us some extra interesting information about his machine&amp;#39;s behaviour:&lt;/span&gt;&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
First, I experimented with the machine, and got these results:&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;table style=&quot;width: 500px;border-spacing:1px;&quot; border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Green&lt;/td&gt;
&lt;td&gt;Blue&lt;/td&gt;
&lt;td&gt;Red&lt;/td&gt;
&lt;td&gt;Yellow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;46&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;42&lt;/td&gt;
&lt;td&gt;58&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;52&lt;/td&gt;
&lt;td&gt;70&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;...&lt;/td&gt;
&lt;td&gt;...&lt;/td&gt;
&lt;td&gt;...&lt;/td&gt;
&lt;td&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;&lt;/br&gt;
From this I figured out the nth term of the pattern for each colour:&lt;br&gt;&lt;/br&gt;
Green: 10n - 8&lt;br&gt;&lt;/br&gt;
Blue: 12n - 2&lt;br&gt;&lt;/br&gt;
Red: 3n + 2&lt;br&gt;&lt;/br&gt;
Yellow: 12n - 12&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
From this I figured out all the numbers that made blue, yellow and green light up are even. The numbers for red are a mixture of odd and even as they increase by threes every time.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
To take the the investigation further, I also recorded the results for various combinations of colours, in the table below:&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;table style=&quot;width: 500px;border-spacing:1px;&quot; border=&quot;1&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;G&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;R&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;GY&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;td&gt;GR&lt;/td&gt;
&lt;td&gt;BY&lt;/td&gt;
&lt;td&gt;BR&lt;/td&gt;
&lt;td&gt;RY&lt;/td&gt;
&lt;td&gt;GYB&lt;/td&gt;
&lt;td&gt;RGY&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;72&lt;/td&gt;
&lt;td&gt;82&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt;92&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;46&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
From this I figured out the nth term of the pattern for the colour combinations:&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Green + yellow: 60n - 48&lt;br&gt;&lt;/br&gt;
Green + blue: 60n - 38&lt;br&gt;&lt;/br&gt;
Green + red: 30n + 2&lt;/mdoxml&gt;</solutionXML>
  <noteXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;div class=&quot;embed&quot;&gt;
&lt;h2&gt;Charlie&amp;#39;s Delightful Machine&lt;/h2&gt;
&lt;br&gt;&lt;/br&gt;
Charlie has a delightful machine with four coloured lights on it.&lt;br&gt;&lt;/br&gt;
You can enter numbers into Charlie&amp;#39;s machine. Each light is controlled by a rule, and if your number satisfies the rule, the light will go on. Some numbers may turn on more than one light!&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Type in some numbers and see which lights you can switch on.&lt;br&gt;&lt;/br&gt;
To start again with a new set of rules, click the Restart button.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div style=&quot;background-color:#000;padding:20px;padding-bottom:20px;width:260px;height:280px&quot;&gt;
&lt;div style=&quot;position:relative;&quot;&gt;&lt;label style=&quot;position:absolute;top:10;color:#fff;font-size:12px;font-family:helvetica,arial,sans-serif&quot;&gt;Type in a number&lt;/label&gt; &lt;input id=&quot;numberText&quot; maxlength=&quot;8&quot; name=&quot;number&quot; size=&quot;8&quot; style=&quot;position:absolute;top:-10px;left:130px;font-size:1.2em&quot; tabindex=&quot;1&quot; type=&quot;text&quot; value=&quot;0&quot;&gt;&lt;/input&gt; &lt;mdo:image id=&quot;red&quot; src=&quot;red.png&quot; style=&quot;position:absolute;left:20px;top:30px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;redOff&quot; src=&quot;redOff.png&quot; style=&quot;position:absolute;left:20px;top:30px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;yellow&quot; src=&quot;yellow.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;yellowOff&quot; src=&quot;yellowOff.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;green&quot; src=&quot;green.png&quot; style=&quot;position:absolute;left:20px;top:130px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;greenOff&quot; src=&quot;greenOff.png&quot; style=&quot;position:absolute;left:20px;top:130px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;blue&quot; src=&quot;blue.png&quot; style=&quot;position:absolute;left:120px;top:130px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;blueOff&quot; src=&quot;blueOff.png&quot; style=&quot;position:absolute;left:120px;top:130px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;input id=&quot;restartButton&quot; name=&quot;restartButton&quot; style=&quot;position:absolute;top:260px&quot; type=&quot;button&quot; value=&quot;Restart&quot;&gt;&lt;/input&gt;&lt;br style=&quot;clear:both&quot;&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
 &lt;/div&gt;
&lt;h3&gt;Why do this problem?&lt;/h3&gt;
&lt;p&gt;Many standard questions give exactly the information required to solve them. In this problem, students need to go in search of the information and work in a systematic way in order to make sense of the results they gather.&lt;/p&gt;
&lt;div&gt;The problem could be used to reinforce work on recording and describing linear sequences.
&lt;p&gt; &lt;/p&gt;
&lt;h3&gt;Possible approach&lt;/h3&gt;
&lt;p&gt;This task will require students to have access to computers. If this is not possible, &lt;a href=&quot;http://nrich.maths.org/7015&amp;amp;part=&quot;&gt;Four Coloured Lights&lt;/a&gt; provides students the opportunity to make sense of numerical rules without the need for computers.&lt;/p&gt;
&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div&gt;&lt;a href=&quot;/6713&quot;&gt;Shifting Times Tables&lt;/a&gt; is a problem about linear sequences that could be used to prepare students for the thinking required in this problem.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Begin the lesson by dividing the board into two columns, one headed with a tick and the other headed with a cross.&lt;/div&gt;
&lt;div&gt;Ask learners to suggest numbers, and write each suggestion in the appropriate column according to a rule of your own choice. Make it clear to the class that the activity is designed to model scientific enquiry, so they can come up with a hypothesis for your rule, but you will not confirm their hypothesis, you will only place numbers in the appropriate column.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div&gt;Here are some suggestions for rules:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Odd numbers&lt;/li&gt;
&lt;li&gt;Numbers which are 1 more than multiples of 4&lt;/li&gt;
&lt;li&gt;Numbers which are 2 less than multiples of  5&lt;/li&gt;
&lt;li&gt;Numbers which are 3 more than multiples of 7&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;Once the class have tried the activity with a couple of rules until all are reasonably convinced their hypothesis holds, move on to the main task.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div&gt;To introduce the main task, show the interactivity and demonstrate entering a couple of numbers to see what lights up. Make sure learners understand that more than one light can light up at once, and that each light is governed by its own simple rule.&lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div&gt;Students could then work in pairs at a computer, trying to light up each of the lights. Challenge them to develop an efficient strategy for working out the rules controlling each light.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
While the class is working, note any particularly good ways of recording or working systematically, and highlight them to the rest of the class.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
Ask students to think about what is special about a rule when all the &amp;#39;light on&amp;#39; numbers&lt;br&gt;&lt;/br&gt;
&lt;ul&gt;
&lt;li&gt;are odd&lt;/li&gt;
&lt;li&gt;are even&lt;/li&gt;
&lt;li&gt;are a mixture of odd and even&lt;/li&gt;
&lt;/ul&gt;
Bring the class together to share insights and conclusions before moving on to &lt;a href=&quot;/7016&quot;&gt;A Little Light Thinking&lt;/a&gt;.
&lt;h3&gt;&lt;br&gt;&lt;/br&gt;
Key questions&lt;/h3&gt;
&lt;p&gt;Which numbers will you try first?&lt;/p&gt;
&lt;div&gt;Which numbers will you try next?&lt;/div&gt;
&lt;div&gt;How will you record your findings?&lt;/div&gt;
&lt;div&gt;How many lightings are necessary to work out the rule for a light?&lt;br&gt;&lt;/br&gt;
 &lt;/div&gt;
&lt;h3&gt;Possible extension&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://nrich.maths.org/7016&amp;amp;part=&quot;&gt;A Little Light Thinking&lt;/a&gt; invites students to explore turning on multiple lights simultaneously.&lt;/p&gt;
&lt;h3&gt;Possible support&lt;/h3&gt;
&lt;p&gt;Learners could use a 100 square (&lt;a href=&quot;/content/id/7024/1-100_NumberGrid.doc&quot;&gt;Word&lt;/a&gt;, &lt;a href=&quot;/content/id/7024/1-100_NumberGrid.pdf&quot;&gt;pdf&lt;/a&gt;) to record which lights turn on for each number they try.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
In the &lt;a href=&quot;/7024/clue&quot;&gt;Hint&lt;/a&gt; there is a version of the interactivity with just two lights which students might find more accessible.&lt;br&gt;&lt;/br&gt;
 &lt;/p&gt;
&lt;/div&gt;&lt;/mdoxml&gt;</noteXML>
  <clueXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
You may prefer to experiment with this two-light version of the interactivity first.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;div style=&quot;background-color:#000;padding:20px;padding-bottom:20px;width:260px;height:180px&quot;&gt;
&lt;div style=&quot;position:relative;&quot;&gt;&lt;label style=&quot;position:absolute;top:10;color:#fff;font-size:12px;font-family:helvetica,arial,sans-serif&quot;&gt;Type in a number&lt;/label&gt; &lt;input id=&quot;numberText&quot; maxlength=&quot;8&quot; name=&quot;number&quot; size=&quot;8&quot; style=&quot;position:absolute;top:-10px;left:130px;font-size:1.2em&quot; tabindex=&quot;1&quot; type=&quot;text&quot; value=&quot;0&quot;&gt;&lt;/input&gt; &lt;mdo:image id=&quot;red&quot; src=&quot;red.png&quot; style=&quot;position:absolute;left:20px;top:30px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;redOff&quot; src=&quot;redOff.png&quot; style=&quot;position:absolute;left:20px;top:30px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;blue&quot; src=&quot;blue.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:0;z-index:1&quot;&gt;&lt;/mdo:image&gt; &lt;mdo:image id=&quot;blueOff&quot; src=&quot;blueOff.png&quot; style=&quot;position:absolute;left:120px;top:30px;opacity:1;z-index:0&quot;&gt;&lt;/mdo:image&gt; &lt;input id=&quot;restartButton&quot; name=&quot;restart&quot; onclick=&quot;restart()&quot; style=&quot;position:absolute;top:160px&quot; type=&quot;button&quot; value=&quot;Restart&quot;&gt;&lt;/input&gt;&lt;br style=&quot;clear:both&quot;&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;script src=&quot;Twolights.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</clueXML>
  <canonXML>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;br&gt;&lt;/br&gt;
&lt;span class=&quot;editorial&quot;&gt;Dominic of Charters School explained his rules:&lt;/span&gt;&lt;br&gt;&lt;/br&gt;
 &lt;br&gt;&lt;/br&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Red Light:        the numbers go up in $5$&amp;#39;s starting at three. e.g $3,8,13,18...$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Yellow Light:   the odd numbers. e.g $1,3,5,7,9,11...$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Green Light:     the $11$ times table. e.g $11,22,33,44,55...$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Blue Light:       the $4$ times table. e.g $4,8,12,16,20 ...$&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;It is impossible to get them all to light up because in the 4 times table there is no odd number so you can never light up the Yellow light and the Blue light together.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;editorial&quot;&gt;Matthew of Portsmouth Grammar School gave a good insight into why his lights wouldn&amp;#39;t light together:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;RED          =  $3n$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;YELLOW =  $3n-1$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;GREEN    =  $9n-7$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;BLUE       =  $11n-8$&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;So...RED could be any number, so lets call it $x$. And...YELLOW would be one less always, so $x-1$. This means that these numbers would always be 1 different and so all four numbers could never be lit up at the same time!!! &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;editorial&quot;&gt;One pupil from Manorfield School encountered a situation when all the lights lit up together:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Red     =  $2N-1$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Yellow =  $7N- 3$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Green   =  $10N+1$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;Blue     =  $2N-1$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt; &lt;/div&gt;
&lt;div&gt;It is possible to get all colours light because and we can do it with the number $11$. It is $1$ less than numbers in the $2$ times table. It is $3$ less than numbers in the $7$ times table. It is $1$ more than numbers in the $10$ times table.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;editorial&quot;&gt;Hersche of European School of Varese gave us a good insight into his reasoing:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;RULES: Testing whether the numbers are part of certain arithmetic progressions (APs).&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;RED:          $x=5+11n$  i.e. $x=5(mod11)$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;YELLOW: $x=9n$        i.e. $x=0(mod9)$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;GREEN:    $x=3+8n$    i.e. $x=3(mod8)$&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;BLUE:       $x=1+2n$    i.e. $x=1(mod2)$ (i.e. x is odd)&lt;/div&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt; &lt;/div&gt;
&lt;div&gt;Solving by first principles (I actually used Chinese Remainder Theorem, but this is simpler!): This problem can first be simplified.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The blue light will light up if the number is odd, but as all numbers in the green AP are odd, we can eliminate the blue AP. Also, the yellow AP is simply the multiples of $9$. Therefore, we need to find odd multiples of $9$ that are in the red and green APs.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;By trial and error, we &quot;luckily&quot; find that $9\times3=27$ is in all four APs, and is one of many answers.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;There are other solutions, which occur every $792$, so the general solution would be $x=27+792n$. This is because $792$ a multiple (the LCM) of $11, 9, 8$ and $2$, so adding it to an existing solution will always give a new one. Thus, after $27$, the next solution would be $819$. &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;br&gt;&lt;/br&gt;
 &lt;br&gt;&lt;/br&gt;
 &lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</canonXML>
  <end_user_role>2</end_user_role>
  <difficulty>3</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>1</keystage3>
  <keystage4>1</keystage4>
  <keystage4plus>0</keystage4plus>
  <title>Charlie's delightful machine</title>
  <description>Here is a machine with four coloured lights. Can you develop a strategy to work out the rules controlling each light?</description>
  <spec_group>Admin
    <specifier>Featured Stage 3&amp;4 Students</specifier>
  </spec_group>
  <spec_group>Numbers and the Number System
    <specifier>Factors and multiples</specifier>
  </spec_group>
  <spec_group>Sequences, Functions and Graphs
    <specifier>Arithmetic sequence</specifier>
  </spec_group>
  <spec_group>Sequences, Functions and Graphs
    <specifier>Sequences</specifier>
  </spec_group>
  <spec_group>Using, Applying and Reasoning about Mathematics
    <specifier>Making and testing hypotheses</specifier>
  </spec_group>
  <spec_group>Using, Applying and Reasoning about Mathematics
    <specifier>Games</specifier>
  </spec_group>
  <spec_group>ajk44
    <specifier>solution needs editing</specifier>
  </spec_group>
  <spec_group>Secondary Mapping Document
    <specifier>Patterns and sequences LS</specifier>
  </spec_group>
  <spec_group>Secondary Mapping Document
    <specifier>DisplayCabinet</specifier>
  </spec_group>
  <spec_group>Secondary processes
    <specifier>PM - Exploring and noticing structure</specifier>
  </spec_group>
  <spec_group>Secondary processes
    <specifier>PM - Working Systematically</specifier>
  </spec_group>
</resource>