Problema Solution
I snap my fingers now. In one second, I snap them again. I wait two seconds and snap them a third time. I wait four seconds before snapping them again. Then I wait eight seconds, then sixteen seconds, and the pattern continues on... The interval between snaps doubles each time. How many times will I snap my fingers during the next year?
Answer provided by our tutors
We will assume the snapping happens at the last second of each interval
First lets find out how many second are in 1 year.
1 year = 365 days = 365*24 h = 365*24*60 min = 365*24*60*60 sec
I snap the fingers at the beginning of the year:
0 sec
2^0 = 1 sec
2^1 = 2 sec
2^2 = 4 sec
2^3 = 8 sec
lets assume that last snap happens after waiting for 2^n seconds, where n is integer
the sum of all intervals needs to be not more that 365*24*60*60.
the sum of the geometric sequence 2^n, n = 0, 1, ..., m is
Sn = 2(2^(n - 1) - 1)/(2 - 1)
Sn = 2(2^(n - 1) - 1)
Sn = 2^n - 2
Sn <= 365*24*60*60
2^n - 2 <= 365*24*60*60
2^n <= 365*24*60*60 + 2
n ln2 <= ln(365*24*60*60 + 2)
n <= ln(365*24*60*60 + 2)/(ln2)
n <= 24.9
click here to see the step by step calculation
the last snap happens for n = 24
counting the snap at the 0 second and the number of terms in the geometric sequence from n = 0 till n = 24 is 25
thus there will be 25 + 1 = 26 snaps during the year.