So I discovered an easy way to add a succession of numbers together a while back, and I'm trying to reverse it for an RPG sheet in LibreOffice Calc. The function probably has a name and I just don't know (or remember) it. The function is basically an addition-based exponent, rather than a multiplication-based one.
So whereas with exponents,
you get $X^2 = X*X$.
With this function,
$\frac {X*(X+1)}{2} = Y$ where $Y = 1+2+3+...+X$
For example, if $X = 12, \frac {12*13}{2} = 78 = 1+2+3+4+5+6+7+8+9+10+11+12$
That said, I want to do the inverse of my "discovery," where $Y >$ (insert wizardry here) $> X$, using the $Y$ and $X$ of the above function.
Does anyone know a name for my "discovered" function?
Does anyone know a way to inverse that function?
It is generally true that $\sum_{i= 1}^n i= \frac{n(n+1)}{2}$.
To invert that, if $y= \frac{n(n+1)}{2}$ then $n(n+1)= n^2+ n= 2y$ so that $n^2+ n- 2y= 0$.
By the quadratic equation, $n= \frac{-1\pm \sqrt{1+ 8y}}{2}$.
Since $n$ must be positive, $n= \frac{-1+ \sqrt{1+ 8y}}{2}$.