Find n term of sequence

270 Views Asked by At

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.

3

There are 3 best solutions below

5
On

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.

0
On

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)

Euclidean algorithm

enter image description here

Horner schema

enter image description here

1
On

In this series : $$\underbrace{0_{⠀⠀1⠀⠀}1_{⠀⠀9⠀⠀}10_{⠀⠀1⠀⠀}11_{⠀⠀89⠀⠀}100_{⠀⠀1⠀⠀}}\underbrace{101_{⠀⠀9⠀⠀}110_{⠀⠀1⠀⠀}111_{⠀⠀890⠀⠀}1000_{⠀⠀1⠀⠀}}1001_{⠀⠀9⠀⠀}1010_{⠀⠀1⠀⠀}1011_{⠀⠀8900⠀⠀}9911$$

I've marked the terms which are following a pattern in their differences . I've divided the terms in $4$ types :

$\underline{TYPE.1}$ If $n=4x+1$ where , $x\in\{1,2,3,4,5,......\}$

$$a_n=11x+\frac{89(10^{x}-1)}{9}$$

[ $Note:$ this is only applicable for $n\in\{5,9,13,17,.....\}$ ]

$$---------------------------------------$$

$\underline{TYPE.2}$ If $n=4x$ where , $x\in\{1,2,3,4,5,......\}$

$$a_n=11x+\frac{89(10^{x-1}-1)}{9}$$

[ $Note:$ this is only applicable for $n\in\{4,8,12,16,.....\}$ ]

$$---------------------------------------$$

$\underline{TYPE.3}$ If $n=2(2y+1)$ where , $y\in\{0,1,2,3,4,5,......\}$ $$a_n=a_{4m+1}+1$$

$$a_n=11y+\frac{89(10^{y}-1)}{9}+1$$

[ $Note:$ this is only applicable for $n\in\{2,6,10,14,.....\}$ ]

$$---------------------------------------$$

$\underline{TYPE.3}$ If $n=2(2y+1)+1$ where , $y\in\{0,1,2,3,4,5,......\}$ $$a_n=a_{2(2y+1)}+9$$

$$a_n=11y+\frac{89(10^{y}-1)}{9}+10$$

[ $Note:$ this is only applicable for $n\in\{3,7,11,15,.....\}$ ]