Title

Name+Contact info
Math 213 -- Mathematics with Mathematica, Fall 2009 
December 3, 2009

Abstract

My project investigates the question.  I use certain Mathematica commands which are put together in innovative ways.  I learn certain things from my project.

Section 1. Introduction

1.1 Background

Certain aspects of life are interesting.  For that reason, I decided to investigate a question related to square numbers.

1.2 Problem Statement

The problem statement I answer is:

What digits can occur as the last digit in a square number?

1.3 Useful Commands

One of the commands that was necessary for my project was Table.  Table generates a list of data depending on an input that varies with a variable.  For example, if we want the squares of the numbers from 1 to 10, we would use the following command, where i is the variable that varies from 1 to 10, and the expression that is evaluated is i^2.

Table[i^2,{i,1,10}]

1.4 File Structure

In Section 2, I explain the code that I used to investigate my problem and in Section 3, I discuss my findings and mention topics for future work.

Section 2. Main Work

2.1 Investigating Square Numbers

It appears that it would be a good idea to create a large list of square numbers.

Squares = Table[i^2,{i,1,10000}];  (*A Semicolon makes sure the long list does not display.*)

2.2 Finding the Last Digit

Now I need to figure out what the last digit of each square is.  I have to use the command IntegerDigits, which takes a number and converts it to a list of digits.  I also use the command Last, which takes the last entry of a list.

LastDigit = Table[Last[IntegerDigits[i^2]],{i,1,10000}];

2.3 Determining Which Digits Appear

Now I can use the function Union to take the list and delete all the duplicates.

Union[LastDigit]

Section 3. Conclusion and Future Work

3.1 Summary

It appears that there are only six possibilities for the last digit of squares.

3.2 Discussion

It was surprising that there are only six possibilities for the last digit of squares.  I figure this has something to do with squaring simply the last digit of any number and looking at the answer modulo 10.  If you take any number between 0 and 9 and square it, you have only the possibilities 0, 1, 4, 5, 6, or 9.  I really learned a lot from my project because I expected that everey number would occur as the terminal digit of a square number.

3.3 Future Work

If I had more time, I would investigate cubes or higher powers of integers.  Or perhaps I would determine squares modulo numbers other than 10.  What happens if you write the numbers in base 11?  What about the next-to-last digit?  There are so many questions to investigate!

Section 4. References

This is where I would list some references if I used some in my work.