Tuesday, 7 July 2026

Repdigit Endings to Squares... and other powers


James Tanton ‏@jamestanton Wrote:

"2^2 ends with 4 and 12^2 ends with 44. Is there a square than ends 444? How about one that ends 4444?"

To which I think the answer is yes,..... and no.
38 squared is 1444
462 squared is 213444
538 squared is 289444 and there are many more... (so I'm pretty firm on the "yes".)


but I don't think you will ever see a square ending in 4444. Here's why:
This is a list of the square numbers that end in 444 from 1 to 100,000,000

00001444
00213444
00289444
00925444
01077444
02137444
02365444
03849444
04153444
06061444
06441444
08773444
09229444
11985444
12517444
15697444
16305444
19909444
20593444
24621444
25381444
29833444
30669444
35545444
36457444
41757444
42745444
48469444
49533444
55681444
56821444
63393444
64609444
71605444
72897444
80317444
81685444
89529444
90973444
99241444

Notice a pattern? Look at that digit in the thousands place...

Those are the squares of these numbers:
0038
0462
0538
0962
1038
1462
1538
1962
2038
2462
2538
2962
3038
3462
3538
3962
4038
4462
4538
4962
5038
5462
5538
5962
6038
6462
6538
6962
7038
7462
7538
7962
8038
8462
8538
8962
9038
9462
9538
9962

and another pattern appears, that may help us with a more formal proof:

I hadn't thought too much about the idea of digit repeats at the end of squares, and maybe you haven't either, so here is a quick question to get you started.
When speaking of square numbers:
What ending digits can repeat 2, 3 or more times? More particularly, is there any ending digit that repeats four (or more) times?


The problem, and some notes from a curious young reader led me to want to take up cubes. and perhaps other powers.  Would there always be a cap on the repdigit endings at three??,   or would higher powers lead to even longer and longer repdigit endings.

I played around with some small cubes and only got double endings of digits for a while, 14^3 = 2744; 42^3 = 74088; 53^3 = 148877 (cute, double doubles); 64^3 = 262144; 71^3 = 357911; 92^3 = 778688; and 99^3 =970299..... so far we have had 44, 88, 77, 44, 11, 88, 93, and 99.

Being persistent I went away and didn;t thinkof it for a few years, but then I took to Google sheets and ran off a few hundred cubes quickly... and behold, at 192^3 I get 7077888.  

But Wait as I scrolled through my "first thousand cubes list, there it was at 753.... 753^3 = 426,957,777.

Much later I found the cube of 3247 ends in 3333,  I don't think there are any five repdigit endings to the cubes, but if you are a clever programmer with the right equipment and find me wrong (or right) send a message and let me know.  I think more like this will continue with fourth, fifth, and higher powers, but I'm not sure if the length or repdigit endings gets longer and longer, although one anonymous reader teased me with, "Oh, there are some really beautiful patterns in the fourth and fifth powers....  


Am I being Hazed???? 

Anyway if you guys find something that you want to share with the rest of us, send me a note and I will pass it on.


After I posted this on LinkedIn, I got a comment from Arthur Rubin with a very nice proof that there could be no square numbers with four consecutive fours at the end.

"If n^2 ends in 4 4s, then (n/2)^2 = n^2/4 ends in 2 1s, which is impossible.


 

Nice, but for students I think it might help to discuss Why there can be no square numbvers ending in two ones.  Dirst let's be clear about one 1.... the only way to get a square number ending in one is to start with a number that ends in one, or nine.  Look at your times tables.  
So why can't we have two ones at the end?  Well think Algebra I, or two or anything after that.  If you have a two digit number that ends in one we cn write bit as x1  or x9, which we know is expressed as 10 x + 1 or 10 x +9.  So let's take the easy one and square it.  (10 x + 1)^2 = 100 + 20 x + 1....right???
Now where is the problem it ends in one, and the 100 doesn't even count if we are looking at the last two digits... but oh that 20x....

what ever numeral x is, 20 x puts an even  number right smack dab in the way of a second 1.  Now you do the x9 and have it ready to turn in when class starts tomorrow  (Man am I a hard teacher...)

A look at the list will convince you that "X^2 ends in 3 4s iff X ≡ ±38 (mod 500)" is true... not a proof but pretty impressive support.   Can you write the other obvious Modular relation that produces three fours in the last three digit spaces? Yeah...Way to go.

And as an additional incentive, Shyam Sunder Gupta added

"No perfect square can end in four like digits except 0's. General formula for ending in three 4's and two 4's is illustrated in detail in the book "Exploring the Beauty of Fascinating Numbers" published by Springer."  To which I add, A wonderful book, and it is on Amazon. 












No comments: