# Math Help - help in my sequence

1. ## help in my sequence

(2,4,8,16,32,64,128,256,512,1024,......)

if i have a number i want to know if it is in the sequence or not
but i don't want the way which i will divide the number by 2 till i found it 2 or not i want a function from one or two steps to know if this number is from sequence or not

2. Take the log using base 2. If the answer is an integer than your number is in the sequence

3. Originally Posted by e^(i*pi)
Take the log using base 2. If the answer is an integer than your number is in the sequence
thx but what meant by log

4. Look at $2^n$.

5. Your sequences is $u_n = 2^n$. By log I mean logarithm which is the inverse of exponentiation. $\log_2(x) = \log_2(2^n) = n$ where x is the number you're wondering whether or not is in sequence

6. thx this will help me alot
thx also plato but i think the second method is easier

7. That's very strange! You say that you do not know what a logarithm is but you think it will be easier to take the logarithm?

If you really do not know about logarithms (especially taking the logarithm, base 2) I would recommend repeatedly dividing by 2. If you eventually arrive at 1 without any fractions, the number is a power of 2.

8. Originally Posted by HallsofIvy
That's very strange! You say that you do not know what a logarithm is but you think it will be easier to take the logarithm?

If you really do not know about logarithms (especially taking the logarithm, base 2) I would recommend repeatedly dividing by 2. If you eventually arrive at 1 without any fractions, the number is a power of 2.
i searched for lagorithm and learned it thx very much