I'm trying to find a function/formula for $a_n$ such that it produces the sequence $112123123412345$ and so on.
I know that one possible way to do this is to find a function like $n-b_n$ where $b_n$ is a function that produces the sequence $0,1,1,3,3,3,6,6,6,6,10,10,10,10,10..$.
I know that the function $\lfloor{\sqrt{n}}\rfloor^2$ produces a somewhat similar sequence to $b_n$ in that it as a series of increasingly large sets of repeated numbers.
However, I am a bit lost on how to proceed from here.
What I am trying to achieve is a sequence such that, for any natural number, there exists a subsequence with that natural number as it's limit. I need to do this without using the $floor$ function. Otherwise, an example of a solution would be $n-\lfloor{\sqrt{n}}\rfloor^2$.
2026-04-02 00:58:23.1775091503
Function that produces sequence 112123123412345...
1.3k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
We have $a_{\frac{1}{2}N\left(N-1\right)+k}=k$ for $1\leq k\leq N$. If $f\left(x\right)$ is the non-negative inverse of $\frac{1}{2}x\left(x-1\right)$, then $$a_n=n-\frac{1}{2}\lfloor f\left(n-1\right)\rfloor\left(\lfloor f\left(n-1\right)\rfloor-1\right).$$ In fact $f=\frac{\sqrt{8x+1}+1}{2}$, so $$a_n=n-\frac{1}{2}\bigg\lfloor \frac{\sqrt{8n-7}+1}{2}\bigg\rfloor\bigg\lfloor \frac{\sqrt{8n-7}-1}{2}\bigg\rfloor.$$