A sequence is given:
$$1,10,11,100,101,110,111,1000,\dots,a_n,\dots$$
The question is: what is the value of $a_n$ for a given $n$?
I have tried a lot of patterns but was not able to meet the general term. Its clear that it follows decimal code pattern with base of 2.


This is just the sequence of positive integers expressed in base two: $a_n$ is the base-two representation of the positive integer $n$. There's not really much more to be said.