General Formula for a sequence with indices increasing in the order $(2 * i)$, where i = 0,1,2,3...

by Samrat Mukherjee   Last Updated September 12, 2019 04:20 AM

I have generated a sequence which looks really simple : $f(n) = 0, 1, 1, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 15 ....n$

The indices are having the same values in the order of $(2*i)$ where $i = 0,1,2,3...$

If possible, please help me generate it's formula.

Thank you



Answers 1


Assuming your function is f(1)=0, f(2)=f(3)=1, f(4)=f(5)=f(6)=f(7)=3,...

So the formula could be $f(n)=2^{\lfloor\log_2(n)\rfloor}-1$ where $\lfloor x\rfloor$ means the largest integer no more than x.

Zhaohui Du
Zhaohui Du
September 12, 2019 03:45 AM

Related Questions


What is the formula for this given function?

Updated February 10, 2019 20:20 PM

limit function of sequence of functions

Updated October 01, 2017 18:20 PM


Convergence of composition of sequence of functions.

Updated September 02, 2019 04:20 AM