Series of doubled numbers

hlsmith

Less is more. Stay pure. Stay poor.
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

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.
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