I recently discovered that Star Trek the next generation is on Netflix, of course that means watching the whole series from the begining.

So the other day in the shower I began to think,  If I had (t) number of cans and I wanted to place them in a triangular stack how could I figure out how many cans need to be on the bottom row (r) and how many rows would it take to get to the top of the stack?