Recall that the *triangunit numbers* are defined as the numbers you get by appending the digit 1 to the end of triangular numbers. Put another way, where denotes the th triangular number, and the th triangunit number. The challenge, posed by Patrick Vennebush, is to discover and prove something interesting about the divisors of triangunit numbers. (There are spoilers ahead, so if you still want to think about this problem yourself first, stop reading now and go read my previous post instead.)

As you may have discovered, all the divisors of triangunt numbers seem to end in either 1 or 9. This is certainly a striking pattern, and if it’s true, can we explain why?

First, we can start with the formula for triangular numbers (which I have shown how to derive before), , and compute as follows:

So every triangunit number is of the form for some natural number .

The next thing to notice is that if we take any two numbers which end with 1 or 9 and multiply them together, their product also ends with 1 or 9. The last digit of a product depends only on the last digits of the factors; multiplying by 1 doesn’t change anything; and 9 times 9 is 81 which ends with 1. Another way to look at it is to note that 9 is the same as (-1) when working mod 10, so we’re really just saying that .

So it’s enough to show that all the *prime* divisors of triangunit numbers end with 1 or 9; if this is true then all the other divisors, being products of the prime divisors, will also end with 1 or 9.

As I noted before, the OEIS page for the triangunit numbers lists the following proof, due to Nick Hobson:

If is an odd prime different from 5 then implies , whence or .

But this is extremely telegraphic, and only makes sense by itself if you have a good background in number theory — so it’s a great proof to include on the OEIS but not so good for all the rest of us! Thankfully, Adam Glesser fleshed it out a bit in a comment on my previous post. I’m re-formulating his explanation in my own words, partly to try to make it as accessible as possible, and partly to make sure I understand it!

Suppose is a prime number which divides the triangunit number . Obviously, cannot be 2 since triangunit numbers always end with 1 (and are therefore odd). also cannot be 5 for the same reason (multiples of 5 always end with 0 or 5).

The fact that is a factor of can be written using a modular equation as

.

(In case you have never seen this sort of equation before, means that and have the same remainder when divided by .)

The next step is the crucial one which I never figured out — but I don’t feel too bad about it (and neither should you, if you didn’t figure it out either) since it requires some experience and background in number theory to think of it. The idea is to *complete the square* since this lets us use *quadratic reciprocity*. What’s that, you say? Read on! We multiply both sides of the equation by 20, then do a bit of rearranging:

OK, so why is this helpful? This is where the law of quadratic reciprocity comes in. I’ll explain exactly what it is in my next post, but in this particular instance, from the fact that 5 is congruent to a square , it allows us to conclude that must also be congruent to a square (although not necessarily the *same* square!).

Well, there aren’t too many possibilities for squares when working :

We already know is not 5. So it must be congruent to 1 or 4 . That means that it ends with 1, 4, 6, or 9. But it can’t end with 4 or 6 because it is prime. Tada!

“But what about that magical quadrilateral recipricosi-thingummy or whatever it was in the middle!?” I hear you cry. Never fear, I shall explain it soon! It is rather famous and interesting and deserves its own post…

To explain quadratic reciprocity in one post – whoa. This sounds like a very brave task, most likely running through moduli, Legendre symbols, and reciprocity. I look forward to it.

Well, it may take more than one post. =) On the other hand, I’m no expert and I don’t intend to give a complete overview…

I’ve recently become interested in mathematics and this blog is awesome for someone (like me) who doesn’t have much knowledge in the subject.

Great job explaining! I’ve actually managed to understand the proof…I think. And I had no idea what mod even meant before reading this post.

Adding 1 to triangular numbers and then finding a pattern in the divisors of those numbers seems so arbitrary. Is there any real-life application to it? It’s fascinating how completely arbitrary mathematical concepts turn out to model the real world.

Fantastic proof! Wonderful ğŸ˜€ Spent a train trip tinkering with the problem, but could only demonstrate the (relatively trivial) fact that the divisors couldn’t end in 0, 2, 4, 6, 8 or 5.

Hope the change of host is working well!

Pingback: Wild About Math bloggers 3/25/11 » Fun Math Blog