Locating elements in a series I have the following series:
\begin{align}
S_1 &= 1, 4, 8, 13, 19, 26, \ldots  \\
S_2 &= 3, 7, 12, 18, 25, 33, \ldots  \\
S_3 &= 6, 11, 17, 24, 32, 41, \ldots  \\
S_4 &= 10, 16, 23, 31, 40, 50, \ldots  \\
S_5 &= 15, \ldots
\end{align}
and infinitely many series. The interesting thing to note is that they form a series both horizontally and vertically. My question is: Given a number in these series, can a formula be derived to find their horizontal and vertical positions? I.e., say $41$ occurs in the third series at the $6$th position.
Thanks
 A: Hint:
Looking at the table, you see that the secondary diagonals are made of consecutive naturals, each in range $\left[\dfrac{n(n+1)}2,\dfrac{n(n+1)}2+n-1\right]$. These ranges are disjoint.
For a given $S$, invert
$$S=\frac{n(n+1)}2$$ and take the integer part to get the row index.
A: The two position functions you need are
$$ h(n) ={\binom {\lfloor 3/2+\sqrt{2+2n}\rfloor} {2} }-(n+1) $$
and
$$ v(n) = (n+1)-{\binom {\lfloor 1/2+\sqrt{2+2n}\rfloor} {2} }. $$
For $\,n=41\,$ we get
 $$ h(41) = {\binom {\lfloor 3/2+\sqrt{84}\rfloor} {2}} - (41+1) = {\binom {10} 2} - 42 = 45 - 42 = 3$$
and
 $$ v(41) = (41+1) - {\binom {\lfloor 1/2+\sqrt{84}\rfloor} {2}} = 42 - {\binom {9} 2} = 42 - 36 = 6.$$
The key insight is the appearance of triangular numbers in the first position in each row. We need to find the inverse function of the triangular numbers. That is, find the positive solution of $\,n = x (x-1)/2\,$ using the quadratic formula and get the floor of it. This inverse function is OEIS sequende A002024. In any case such as this, there can be several equivalent formulas which produce the same results. The reason is the use of the floor function. It allows for leeway.
A:  I found the formula for k by some observation and rough work.
