<?xml version="1.0" encoding="UTF-8" ?>
  <resource>
  <id>595</id>
  <path>/www/nrich/html/content/98/09/six2/</path>
  <resourceTypeID>1</resourceTypeID>
  <last_published>2011-02-01T00:00:01</last_published>
  <indexXML>&lt;mdoxml version=&quot;1.0&quot;&gt;&lt;p&gt;A student bought 17 pencils for £1.44. He paid 2 pence more for each coloured pencil than for each plain pencil. How many of each kind did he buy at what price?&lt;/p&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;br&gt;&lt;/br&gt;
&lt;p class=&quot;editorial&quot;&gt;A student bought 17 pencils for
£1.44. He paid 2 pence more for each coloured pencil
than for each plain pencil. How many of each kind did he buy at
what price?&lt;/p&gt;
&lt;p class=&quot;editorial&quot;&gt;You could find the answer by `trial and
improvement' (or trial and tribulation as Vikki Benhae called it)
but there are better methods.&lt;/p&gt;
&lt;p class=&quot;editorial&quot;&gt;Felicity, Anna and Kirsty of The Mount School,
York gave this very neat solution:&lt;/p&gt;
&lt;p&gt;Since 16 x 9 = 144 we decided that the plain pencils had to cost
less than 9 pence, since these are the cheapest. We started with
pencils costing 8p and colours costing 10p and worked
systematically through the pairs of numbers adding to 17 and got
the answer 13 pencils at 8p and 4 pencils at 10p. We tried other
combinations and soon came to the conclusion that there was no
other solution.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;editorial&quot;&gt;Similar solutions came from Kayleigh,
Jenny, Naomi and Bethany of Maidstone Girls Grammar School. Here is
how Bethany explained her reasoning:&lt;/span&gt;&lt;/p&gt;
&lt;br&gt;&lt;/br&gt;
First of all I divided £1.44 by 17.&lt;br&gt;&lt;/br&gt;
144/17 = 8 remainder 8.&lt;br&gt;&lt;/br&gt;
There is 8 pence left, which means there are only enough pence
spare for 4 coloured pencils to be 2 pence more. Therefore my
conclusion is:&lt;br&gt;&lt;/br&gt;
13 plain pencils at 8 pence&lt;br&gt;&lt;/br&gt;
4 coloured pencils at 10 pence.&lt;br&gt;&lt;/br&gt;
&lt;br&gt;&lt;/br&gt;

&lt;p class=&quot;editorial&quot;&gt;Only read on if you are happy with algebra!
Charlotte of Maidstone Girls Grammar came closest to this method of
solution.&lt;/p&gt;
&lt;p&gt;Suppose he bought &lt;em&gt;n&lt;/em&gt; coloured pencils and (17-
&lt;em&gt;n&lt;/em&gt; ) plain pencils, the cost of a plain pencil was
&lt;em&gt;c&lt;/em&gt; pence, and the cost of a coloured pencil was (
&lt;em&gt;c&lt;/em&gt; + 2) pence, then&lt;/p&gt;
&lt;p&gt;(17 - &lt;em&gt;n&lt;/em&gt; ) &lt;em&gt;c&lt;/em&gt; + &lt;em&gt;n&lt;/em&gt; ( &lt;em&gt;c&lt;/em&gt; +2) =
144,&lt;/p&gt;
&lt;p&gt;17 &lt;em&gt;c&lt;/em&gt; + 2 &lt;em&gt;n&lt;/em&gt; = 144.&lt;/p&gt;
&lt;p&gt;This is a special case of a more general idea and there are
infinitely many integer solutions to this equation. Just suppose
the problem had been to find out all we could about ALL these
solutions.&lt;/p&gt;
&lt;p&gt;It is not difficult to find one pair of solutions. If we are
looking for positive solutions then we know &lt;em&gt;c&lt;/em&gt; is less than
9 (because 17 x 9 &amp;gt; 144). Also &lt;em&gt;c&lt;/em&gt; must be even because
the other terms in the equation are even.&lt;/p&gt;
&lt;p&gt;If &lt;em&gt;c&lt;/em&gt; = 8 then 136 + 2 &lt;em&gt;n&lt;/em&gt; = 144 so &lt;em&gt;n&lt;/em&gt; =
4.&lt;/p&gt;
&lt;p&gt;Notice that if you know a single pair of values giving a
solution then, for other solutions, larger values of &lt;em&gt;c&lt;/em&gt;
will correspond to smaller values of &lt;em&gt;n&lt;/em&gt; and vice versa. If
you increase &lt;em&gt;c&lt;/em&gt; by 2 it makes the left hand side go up by
34 but if you also decrease &lt;em&gt;n&lt;/em&gt; by 17 then it brings the
left hand side down by 34 again.&lt;br&gt;&lt;/br&gt;
If &lt;em&gt;c&lt;/em&gt; = 10 then &lt;em&gt;n&lt;/em&gt; = 4 - 17 = -13.&lt;br&gt;&lt;/br&gt;
If &lt;em&gt;c&lt;/em&gt; = 12 then &lt;em&gt;n&lt;/em&gt; = -30 &lt;em&gt;etc.&lt;/em&gt;&lt;br&gt;&lt;/br&gt;
Similarly if &lt;em&gt;c&lt;/em&gt; decreases then &lt;em&gt;n&lt;/em&gt; increases:&lt;br&gt;&lt;/br&gt;
If &lt;em&gt;c&lt;/em&gt; = 6 then &lt;em&gt;n&lt;/em&gt; = 4 + 17 = 21.&lt;br&gt;&lt;/br&gt;
If &lt;em&gt;c&lt;/em&gt; = 4 then &lt;em&gt;n&lt;/em&gt; = 38 &lt;em&gt;etc.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This method tells us that 8 plus any multiple of 2 and 4 minus
the same multiple of 17 are pairs of solutions. The solution pairs
are given by the formula&lt;br&gt;&lt;/br&gt;
8+2 &lt;em&gt;t&lt;/em&gt; and 4-17 &lt;em&gt;t&lt;/em&gt; for any integer &lt;em&gt;t&lt;/em&gt; .&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;editorial&quot;&gt;This problem takes us into a corner of
the number theory world where a lot of interesting work has been
done and fascinating discoveries have been made. Equations which
have whole number solutions are called Diophantine equations after
a Greek mathematician of the third century AD. Click here and try
to solve the puzzle on his tomb which tells a little bit about the
life of&lt;/span&gt; &lt;a href=&quot;http://www-groups.dcs.st-and.ac.uk/~history/Quotations/Diophantus.html&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Diophantus of
Alexandria&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;br&gt;&lt;/br&gt;&lt;/mdoxml&gt;</solutionXML>
  <noteXML/>
  <clueXML/>
  <canonXML/>
  <end_user_role>2</end_user_role>
  <difficulty>4</difficulty>
  <keystage1>0</keystage1>
  <keystage2>0</keystage2>
  <keystage3>1</keystage3>
  <keystage4>0</keystage4>
  <keystage4plus>0</keystage4plus>
  <title>Whole Numbers Only</title>
  <description>Can you work out how many of each kind of pencil this student
bought?</description>
  <spec_group>Calculations and Numerical Methods
    <specifier>Estimating and approximating</specifier>
  </spec_group>
  <spec_group>Numbers and the Number System
    <specifier>Properties of numbers</specifier>
  </spec_group>
  <spec_group>Numbers and the Number System
    <specifier>Integers</specifier>
  </spec_group>
  <spec_group>Algebra
    <specifier>Diophantine equations</specifier>
  </spec_group>
  <spec_group>Algebra
    <specifier>Simultaneous equations</specifier>
  </spec_group>
</resource>