Help with calculating geometric sequence

Hi,

I hope it is the right place to post it...

I need help with the following sequence:

(it's 2 to the power of 2 to the power of i)

I need to find i as a function of N.

meaning how further away in the sequence do i need to go, in order to get N.

any help would greatly appreciated.

Re: Help with calculating geometric sequence

Hey Stormey.

Did you mean as a function of j?

I don't know of a closed form solution but you should look into techniques like Euler-Mclaurin series and their relationship to integrals.

Re: Help with calculating geometric sequence

Hi chiro.

yes, as a function of j, sorry.

the truth is that it is actually a question from data starctures in computer science, so I almost sure the solution suppose to be accomplished with discrete math.

(using some manipulation to compute the sum of a more simple sequence, to which the sum is known or easy to calculate, and then calculating the sum of the original sequence,

I also tried to think about some change of variable [index in this case], that will help simplify this problem)

Re: Help with calculating geometric sequence

You might want to consider a bit-wise representation (i.e. binary) and how that relates to N.