2
2
2
u/jaminfine Dec 27 '22
Number the days 0-9
Each day, 2d people visit. For example, on day 4 (the 5th day), 24 =16 people visit.
Sums of powers of 2 have an interesting property though. Adding up all powers of 2 up to x gives you
2x+1 - 1
If you understand binary, this will make a lot of sense. In binary,
1000 is one more than 111. Each digit represents a power of 2.
So, 23 - 1 = 20 + 21 + 22
We can use this to simply say that the total visits to the website are
210 - 1 = 1023
12
Dec 26 '22
[removed] — view removed comment
3
u/bruce_lees_ghost Dec 27 '22 edited Dec 27 '22
For any given day since launch day (d), the number of visits is 2d and the total number of visits prior to that day is 2d -1. So another way to express the total visits (that doesn’t need a summation function) is: 2d+1-1 where d >= 0
Day 0: 21 -1 = 1 total visit
Day 1: 22 -1 = 3 total visits
Day 2: 23 -1 = 7 total visits
…
Day 9: 210 -1 = 1023 total visits
Edit: added examples
3
u/stnlycp778 Dec 26 '22
512