# Investigations in Patterns in Last Digits of Square Numbers and Higher Powers

• Steven J. Miller Williams College
• Elizabeth Wiley Westridge School for Girls
• Julia Wiley Westridge School for Girls
Keywords: patterns in final digits; k-power good numbers; totient function; Euler's theorem

### Abstract

It is interesting to see what patterns exist in the final digits of powers of integers; the goal of this work is to introduce some new problems and results, which are ideally suited for interested readers to pursue further. We start our investigation with squares and say a square is a k-square good number if its last k digits base 10 are the same non-zero number, and the last k + 1 digits are not identical. We completely analyze k-square good numbers; when k = 1 we can have final digits of 1, 4, 5, 6 and 9 (with the second to last digit different), when k = 2 we can end with 44 but not 444, when k = 3 we can end with 444 but not 4444, and there are no 4-square good numbers. We then generalize these arguments to look at k-cube and k-fourth good numbers, completely analyzing these cases. Noting that any even power 2m is the same as squaring an mthpower, we can extend our results to even powers more easily than to odd, as the behavior has to be a subset of what we have seen for squares. There are complications arising from powers of 2 dividing our numbers, but using results from elementary number theory (in particular concerning the totient function and Euler’s theorem), we reduce the problem for even powers to a tractable finite computation, and completely resolve this case, and then end with a list of accessible next problems.

Published
2024-01-26
How to Cite
Miller, S. J., Wiley, E., & Wiley, J. (2024). Investigations in Patterns in Last Digits of Square Numbers and Higher Powers. The PUMP Journal of Undergraduate Research, 7, 14-28. https://doi.org/10.46787/pump.v7i0.3977
Section
Articles