# Find n term of sequence

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.

-

As Brian M. Scott already said, there isn't much more to say about your series. It's only about converting bases. But please note that, given only the first few elements of this series, there could be many series that make sense. I've described one way to find a series that makes sense in this answer.

# Converting a number from decimal to base two

I guess you can convert from base 10 to base 2 in many ways, but two standard ways are the Euclidean algorithm and the Horner's method (LaTeX-sources for the following images are here)

## Horner schema

-
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.
@Bharat: Just convert $n$ to base two. There are standard algorithms for that. –  Brian M. Scott Aug 9 '13 at 13:31