Series of doubled numbers

hlsmith

Less is more. Stay pure. Stay poor.
#1
I am looking for a way to double a number (i.e., "3") until I get to around 3 million; resulting in a series that I can plot.

Solution: 3, 6, 12, 24, 48, 96,..., ~3M
 
Last edited:

Jake

Cookie Scientist
#2
The series is 3 * 2^n for n = 0, 1, 2, ...

To find the value of n that yields 3M, set the expression above equal to 3M and solve for n.
 

hlsmith

Less is more. Stay pure. Stay poor.
#3
Thanks @Jake

I didn't follow the solve for n part (end of the day), but if you can share the solution or your thoughts that would be interesting. I created the below lines that serve my current needs.

Code:
cheese = seq(0, 20, by = 1)
Cheesy = 3*2^cheese
Cheesy
 

Jake

Cookie Scientist
#4
I'm telling you to use math. Hint: logarithms

You see there's this rule here about having to show effort toward solving your question... ;)