What one typically imagines when someone says something "came to [them] in a dream" is that it was, for all intents and purposes, handed down to them like some divine revelation. I was not so lucky; I battled in a half-lucid state to form an equation for triangular numbers for reasons that I cannot now recall.
So that we're all on the same page, the Xth triangular number--hereafter ΔX for simplicity; this almost certainly isn't the convention, but if the math nerds out there wanted me to care you shouldn't have made e a number and theta a variable--is the sum of the numbers from 1 to X. E.g. the ninth triangular number (Δ9) is 45, since 1+2+3+4+5+6+7+8+9=45. (The smartasses out there will notice that this is already an equation, but it'd quickly get tedious if I wanted to find Δ100 or something.)
I had the intuition that the way to attack the problem was to play with unit representations like when we were children first learning what numbers were.
^ Artist's interpretation of the bullshit I was getting up to.
Now, the first thing I noticed was that if you spin the Δ(X-1) piece around and drop it on the ΔX piece like this is Tetris, you get a square of side length X--
--and I really thought I was on to something here. But the problem with this idea is that you now have to calculate Δ(X-1). Well that's okay--according to the equation, that's just (X-1)²-Δ(X-2).
And if I'd been lucid, that's the point where I'd be like Hey, wait a second.... But I was not, so I got all the way to ΔX=X²-(X-1)²+(X-2)²...±1 before I realized that I'd created a more tedious equation.
My next thought was that the bigger ΔX is, the more the shape approximates a triangle, so I struggled with trying to find a way to average the zigzag into a proper hypotenuse--you know, in my head, while half-asleep.
Shockingly, this was not a productive use of my time.
But eventually this led to an actually good idea: if we just separate the triangle with height and base X from the rest of the shape, what do we get?
We get one triangle with a base and height of X (and thus an area of X²/2) and X triangles with a base and height of 1 (and thus areas of 1/2). Or to simplify it down:
ΔX=(X²+X)/2
This surely exists out there somewhere already--it'd be wild if it doesn't--but I deduced it myself from first principles.









