September 30, 2005
7:30 am
Courant & Robbins [p. 23]
I have generated 5 prime numbers using Euclid's method. Now to check that I haven't made any errors.
In[1]:=
Out[1]=
In[2]:=
Out[2]=
In[3]:=
Out[3]=
In[4]:=
Out[4]=
In[5]:=
Out[5]=
In[6]:=
Out[6]=
Ooops!! Factor isn't doing what I thought it was.
In[7]:=
Out[7]=
In[9]:=
Out[9]=
There, that is the function I want. Now...
In[10]:=
Out[10]=
That hurts. There are some factors. I did make a mistake.
In[11]:=
Out[11]=
Dummy. I was right all along. I didn't look closely at the output. All of the factors were prime numbers. Still, there is a lesson here as well.
Created by Mathematica (September 30, 2005) |