nth element in the given sequence Given two constants, a and b, and a sequence constructed as follows:
1, 1, 1, 1...(a - 1 times), 2, 2, 2, 2,...(a-2) times,......a-1
For example, for a = 6, 
1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5
Ques: Determine the bth term in the sequence


*

*This is opposite to the sequence given here: Finding the nth element of a sequence
I am not working for a proof here, any pointers to the explanation would help loads. Thank you
 A: Let's flip the sequence to give,
5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1
Now if we perform, $a-t_n$ for all the terms it gives us,
1, 2, 2, 3, 3, 3.....5
We know the term $t_n = \lfloor \sqrt{2n} + \frac{1}{2} \rfloor$. Our term for the flipped sequence is just $t_n = a-\lfloor \sqrt{2n} + \frac{1}{2} \rfloor$.
The index of the original sequence w.r.t the flipped sequence is $\frac{a(a-1)}{2} - n$. So putting it together,
$$
t_{\left(\frac{a(a-1)}{2} - n\right) } = a-\lfloor \sqrt{2n} + \frac{1}{2} \rfloor $$
Replacing $n$ with $\frac{a(a-1)}{2} - n$,
$$
t_{n} = a-\lfloor \sqrt{2\left(\frac{a(a-1)}{2} - n\right) } + \frac{1}{2} \rfloor $$
A: You can actually use the answer of the question that you linked to generate an answer of your own! To find the b'th element of the sequence proceed as follows:

Let c be (a^2+a))/2 -b. This step serves to let b start from the other end of the sequence.

Use the formula that is in the link for the number c. Let the answer be named d.

b'th element= a-d

The logic behind this is that the sequence you present can easily be translated into the sequence in the link by first reversing the indexing of your list, and then letting each number be "a-that number".
