Charlie's Delightful Machine

Stage: 3 and 4 Challenge Level:

Hannah from Wallington High School for Girls suggested a possible starting point:
A strategy is to perhaps type in a number one by one so start with 1 then
2,3,4 etc and recording each light that gets turned on.

The Year 9 Puzzle Club at Huddersfield Grammar School worked out their machine's rules as follows:

We wrote down which lights lit up for numbers 1-45, then wrote down the sequences for each colour.

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.

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.

Aswaath, from Garden International School, tested the machine in the same way, but gave us some extra interesting information about his machine's behaviour:

First, I experimented with the machine, and got these results:

Green

Blue

Red

Yellow

2

10

5

0

12

22

8

12

22

34

11

24

32

46

14

36

42

58

17

48

52

70

20

60

...

...

...

...

From this I figured out the nth term of the pattern for each colour:
Green: 10n - 8
Blue: 12n - 2
Red: 3n + 2
Yellow: 12n - 12

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.

To take the the investigation further, I also recorded the results for various combinations of colours, in the table below:

G

B

R

Y

GY

GB

GR

BY

BR

RY

GYB

RGY

2

10

5

0

12

22

32

-

-

-

-

-

12

22

8

12

72

82

62

22

34

11

24

92

32

46

14

36

From this I figured out the nth term of the pattern for the colour combinations:

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the
NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to
embed rich mathematical tasks into everyday classroom practice. More information on many of our other activities
can be found here.