I have this equation
a(n) = 2^(n - 1) n
for the series
1,4,12,32,80,192,448,.....
So when n = 4, a(n) = 32
What I am looking for is to get n for a(n), but a(n) is not always in the series Example
Get n for 50?
50 is between a(4) and a(5)
In this case it will be the smaller one even if we are getting n for 447, which is between a(6) and a(7), but clearly it is much closer to a(7), I will require n =6
I will be using the equation in a computer program, so if the convertion equasion returns a fraction/decimal, that is fine, as converting it into integer will do the trick.
So basically, I need the above equation converted into
n = .....
Sorry, I don't know what tag best suits the question, please amend if you don't mind.