<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="./stylesheet/mathml.xsl"?>
<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
	<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
	<!ATTLIST maction id ID #IMPLIED>
]>-->
<!DOCTYPE html SYSTEM "myents.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<link href="./stylesheet/style.css" rel="stylesheet" type="text/css" />
		<title>CapScience MathML Tutorial</title>
		<style type="text/css">
[class="background"] {
 background-image: url(http://www.mozilla.org/images/mozilla-banner.gif);
 border: 1px solid blue;
 -moz-opacity: 0.3;
}
[class="foreground"] {
 -moz-opacity: 100;
 font-weight: bold;
}
[-moz-math-state="zoommath"], [-moz-math-state="zoommath+viewmath"] {
 font-size: 300%;
}
</style>
		<script type="text/javascript" src="entity.js" />
		<script type="text/javascript" src="viewmath.js" />
		<script type="text/javascript"><![CDATA[
function setSelection(id,value) {
 document.getElementById(id).setAttribute("selection",value);
}
function expand()
{
 setSelection("a11","2");  setSelection("a12","2");  setSelection("a13","2");
 setSelection("a21","2");  setSelection("a22","2");  setSelection("a23","2");
 setSelection("a31","2");  setSelection("a32","2");  setSelection("a33","2");
 setSelection("a41","2");  setSelection("a42","2");  setSelection("a43","2");
}
function unexpand()
{
 setSelection("a11","1");  setSelection("a12","1");  setSelection("a13","1");
 setSelection("a21","1");  setSelection("a22","1");  setSelection("a23","1");
 setSelection("a31","1");  setSelection("a32","1");  setSelection("a33","1");
 setSelection("a41","1");  setSelection("a42","1");  setSelection("a43","1");
}
function handlecontext(evt)
{
 var target = evt.target;
 if (target.nodeType == Node.TEXT_NODE) { // leaf text
   target = target.parentNode;
 }
 var m = findmathparent(target);
 if (m) {
   // leave the link demo alone
   if (m.parentNode.localName == 'a') {
     return;
   }

   // -moz-math-state is used as a tri-state flag
   // [not there], [value='zoommath'], [value='zoommath+viewmmath']
   var mathstate = m.getAttribute('-moz-math-state');
   if (!mathstate) {
     m.setAttribute('-moz-math-state', 'zoommath');
   }
   else if (mathstate == 'zoommath') {
     viewmath(evt);
     m.setAttribute('-moz-math-state', 'zoommath+viewmath');
   }
   else if (mathstate == 'zoommath+viewmath') {
     m.removeAttribute('-moz-math-state');

     // close the viewsource window - disabled because it is slowwww...
     // if (gWYSIWYGWindow && !gWYSIWYGWindow.closed) {
     //   gWYSIWYGWindow.close();
     //   gWYSIWYGWindow = null;
     // }
   }

   // the math context disables the normal context menu
   evt.preventDefault();
 }
}
]]></script>
	</head>
	<!-- <body bgcolor="#ffffff" oncontextmenu="handlecontext(event)"> -->
	<body oncontextmenu="handlecontext(event)">
		<!--<body>-->
		<!-- <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
 <mrow>
  <msubsup>
   <mo>&Sum;</mo>
   <mi>k=1</mi>
   <mi>&infin;</mi>
  </msubsup>
  <mfrac>
   <mi>1</mi>
   <mrow>
    <mi>k</mi>
   </mrow>
  </mfrac>
 </mrow>
<mo>=</mo>
 <mrow>
  <msub>
   <mo>&Pi;</mo>
   <mi>p</mi>
  </msub>
  <mfrac>
   <mn>1</mn>
   <mrow>
    <mn>1</mn>
    <mo>-</mo>
    <mfrac>      <mn>1</mn>
     <mrow>
      <mn>p</mn>
     </mrow>
    </mfrac>
   </mrow>
  </mfrac>
 </mrow>
</mrow>
</math>
<math xmlns="http://www.w3.org/1998/Math/MathML">
 <mrow>
    <munderover>
      <mrow>
<mo>&Sum;</mo>
      </mrow>
      <mrow>
        <mi>k</mi>
        <mo>=</mo>
        <mn>1</mn>
      </mrow>
      <mrow>
        <mi>&infin;</mi>
      </mrow>
    </munderover>
  </mrow>
 <mrow>
    <mfrac>
      <mrow>
        <mn>1</mn>
      </mrow>
      <mrow>
<mi>k</mi>
      </mrow>
    </mfrac>
  </mrow>
  <mrow>
    <mo>=</mo>
    <munder>
      <mrow>
<mo>&Product;</mo>
      </mrow>
      <mrow>
        <mi>p</mi>
      </mrow>
    </munder>
  </mrow>
    <mrow>
    <mfrac>
      <mrow>
        <mn>1</mn>
      </mrow>
      <mrow>
        <mn>1</mn>
        <mo>-</mo>
        <mfrac>
          <mrow>
<mn>1</mn>
          </mrow>
          <mrow>
            <mi>p</mi>
          </mrow>
        </mfrac>
      </mrow>
    </mfrac>
  </mrow>
</math>-->
		<h1>A Bit of Maths, a Bit of UML...</h1>
		<h2>A bit of Maths</h2>
		<p>For this tutorial we will be considering three types of number prime numbers, mersenne prime and perfect numbers. </p>
		<p>A <a href="http://www.utm.edu/research/primes/index.html">
				<b>Prime</b>
			</a> number is any number that is only divisible by itself and one. So examples of prime number are  
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mo stretchy="true">{</mo>
					<mrow>
						<mn>1</mn>
						<mo>,</mo>
						<mn>2</mn>
						<mo>,</mo>
						<mn>3</mn>
						<mo>,</mo>
						<mn>5</mn>
						<mo>,</mo>
						<mn>7</mn>
						<mo>,</mo>
						<mn>1</mn>
						<mn>1</mn>
						<mo>.</mo>
						<mo>.</mo>
						<mo>.</mo>
					</mrow>
					<mo stretchy="true">}</mo>
				</mrow>
			</math>
		</p>
		<p>
A <a href="http://www.utm.edu/research/primes/mersenne/index.html">
				<b>Mersenne</b>
			</a> prime is a special type of prime number in that it is a prime number that can be written in the form of 
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<msup>
						<mn>2</mn>
						<mrow>
							<mi>k</mi>
						</mrow>
					</msup>
					<mo>-</mo>
					<mn>1</mn>
				</mrow>
			</math>. Example of the first few mersenne number are 
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mo stretchy="true">{</mo>
					<mrow>
						<mn>1</mn>
						<mo>,</mo>
						<mn>3</mn>
						<mo>,</mo>
						<mn>7</mn>
						<mo>,</mo>
						<mn>15</mn>
						<mo>,</mo>
						<mn>31</mn>
						
						<mo>,</mo>
						<mn>63</mn>
						<mo>,</mo>
						<mn>127</mn>
						<mo>,</mo>
						<mn>255</mn>
						<mo>.</mo>
						<mo>.</mo>
						<mo>.</mo>
					</mrow>
					<mo stretchy="true">}</mo>
				</mrow>
			</math>
		</p>
		<p>
A <a href="http://primes.utm.edu/glossary/page.php/PerfectNumber.html">
				<b> Perfect</b>
			</a> numbers, on the other hand is, that which is equal to the sum of it parts.  Put another way, a whole number is <b>perfect</b> if it is equal to the sum of its proper divisors. So for example the number 6 is perfect because it proper divisors are 1, 2, 3 and 1 + 2 + 3 = 6. So also are 28 (1 + 2 + 4 + 7 +14); 496 and 8128. There numbers constitute the first four perfect numbers and as is evident for the series there are <i>not</i> that many of them. 
		</p>
		<p>So what is the relationship between these numbers? From its definition it is clear that a mersenne prime is also a prime numbers. A consequence of this is, that k in the 
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<msup>
						<mn>2</mn>
						<mrow>
							<mi>k</mi>
						</mrow>
					</msup>
					<mo>-</mo>
					<mn>1</mn>
				</mrow>
			</math>
equation must also be prime. 
Also, a relationship between prime numbers and perfect numbers had been known since antiquity and formulated by <a href="http://members.fortunecity.com/kokhuitan/euclid.html">Euclid</a> in the following Theorem. </p>
		<p>
			<b>Theorem. </b>
			<i>If <math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<msup>
							<mn>2</mn>
							<mrow>
								<mi>k</mi>
							</mrow>
						</msup>
						<mo>-</mo>
						<mn>1</mn>
					</mrow>
				</math> is prime and if  
<math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<mi>N</mi>
					</mrow>
					<mo>=</mo>
					<mrow>
						<msup>
							<mn>2</mn>
							<mrow>
								<mi>k</mi>
								<mo>-</mo>
								<mn>1</mn>
							</mrow>
						</msup>
					</mrow>
					<mrow>
						<mo stretchy="true">(</mo>
						<mrow>
							<msup>
								<mn>2</mn>
								<mrow>
									<mi>k</mi>
								</mrow>
							</msup>
							<mo>-</mo>
							<mn>1</mn>
						</mrow>
						<mo stretchy="true">)</mo>
					</mrow>
				</math>, then N is perfect.</i>
		</p>
		<p>
But it wasn't until almost 2000 year later that the exact relationship between these types of numbers was resolved by <a href="http://members.fortunecity.com/kokhuitan/euler.html">Euler</a> in the following theorem.</p>
		<p>
			<b>Theorem. </b>
			<i>If N is an even perfect number, then 
<math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<mi>N</mi>
					</mrow>
					<mo>=</mo>
					<mrow>
						<msup>
							<mn>2</mn>
							<mrow>
								<mi>k</mi>
								<mo>-</mo>
								<mn>1</mn>
							</mrow>
						</msup>
					</mrow>
					<mrow>
						<mo stretchy="true">(</mo>
						<mrow>
							<msup>
								<mn>2</mn>
								<mrow>
									<mi>k</mi>
								</mrow>
							</msup>
							<mo>-</mo>
							<mn>1</mn>
						</mrow>
						<mo stretchy="true">)</mo>
					</mrow>
				</math>
, where 
<math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<msup>
							<mn>2</mn>
							<mrow>
								<mi>k</mi>
							</mrow>
						</msup>
						<mo>-</mo>
						<mn>1</mn>
					</mrow>
				</math>
 is prime</i>
		</p>
		<p>In plain language an even perfect number has a mesenne prime associated with it.</p>
		<h2>A bit of UML</h2>
		<p>A mersenne prime then is a special type of prime number. In UML this is represented as an <i>'is a'</i> relationship <i>i.e.</i> A mersenne prime <i>is a</i> special type of prime number. Also since k in
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<msup>
						<mn>2</mn>
						<mrow>
							<mi>k</mi>
						</mrow>
					</msup>
					<mo>-</mo>
					<mn>1</mn>
				</mrow>
			</math> 
				is also prime, then there is also an <i>'has a'</i> relationship <i>i.e.</i> A Mersenne number <i>has a</i> Prime number.  
			</p>
		<p>
			<img alt="" src="./images/mersennePrime.gif" />
		</p>
		<p>From Euler theorem on perfect numbers above it is clear that there are two types Odd Perfect numbers and Even Perfect numbers.
 Again this can be represented in UML as follows:</p>
		<p>
			<img src="./images/perfectNumber.gif" alt="" />
		</p>
		<p>It is interesting to note that an odd perfect number has never been found even though some extraordinary properties about them are known, among which are:</p>
		<ul>
			<li>An odd perfect number cannot be divided by 105</li>
			<li>An odd perfect number must contain at least 8 different prime factors</li>
			<li>The smallest odd perfect number must exceed 
<math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<msup>
							<mn>10</mn>
							<mrow>
								<mn>300</mn>
							</mrow>
						</msup>
					</mrow>
				</math>
			</li>
			<li>The second largest prime factor of an odd number exceeds 1000</li>
			<li>The sum of the reciprocials of all odd perfect number id finite. Symbolically
<math xmlns="http://www.w3.org/1998/Math/MathML">
					<mrow>
						<munder>
							<mrow>
								<mo>&#x2211;</mo>
							</mrow>
							<mrow>
								<mi>odd perfect</mi>
							</mrow>
						</munder>
						<mfrac>
							<mrow>
								<mn>1</mn>
							</mrow>
							<mrow>
								<mi>n</mi>
							</mrow>
						</mfrac>
						<mo>&lt;</mo>
					</mrow>
					<mrow>
						<mi>&#x221E;</mi>
					</mrow>
				</math>
			</li>
		</ul>
		<p>Look at item three on the list; imagine trying to do some long division sums in your head with that number</p>
		<p>Finally, again from Eular theorem, perfect numbers are related to prime numbers in that an all even perfect number can be expressed in the form
<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mi>N</mi>
				</mrow>
				<mo>=</mo>
				<mrow>
					<msup>
						<mn>2</mn>
						<mrow>
							<mi>k</mi>
							<mo>-</mo>
							<mn>1</mn>
						</mrow>
					</msup>
				</mrow>
				<mrow>
					<mo stretchy="true">(</mo>
					<mrow>
						<msup>
							<mn>2</mn>
							<mrow>
								<mi>k</mi>
							</mrow>
						</msup>
						<mo>-</mo>
						<mn>1</mn>
					</mrow>
					<mo stretchy="true">)</mo>
				</mrow>
			</math>
			<i>i.e.</i>
			<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mi>N</mi>
				</mrow>
				<mo>=</mo>
				<mrow>
					<msup>
						<mn>2</mn>
						<mrow>
							<mi>k</mi>
							<mo>-</mo>
							<mn>1</mn>
						</mrow>
					</msup>
				</mrow>
			</math>
 
  (a mersenne number). Therefore every even perfect number <i>has a</i> mersenne number. Once more in UML this can be diagrammatically depicted as follows:</p>
		<p>
			<img src="./images/perfectPrimeNumber.gif" alt="" />
		</p>
	</body>
</html>
