Consider the sequence s=1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1,2.... it can be described as 1 one, 2 twos, 2 ones, 1 two, 1 one, 2 twos, 1 one, 2 twos etc. the counts that occur in the above description form s itself! how many twos occur in the first 10,000,000 elements of this sequence?
Answers
Answered by
3
In the first 10 numbers the number of 2s are 5.
So in the first 10^7 elements the number of 2s are 10^7/2
= 5^6 or 5,000,000.
Hope this helps.
-WonderGirl
So in the first 10^7 elements the number of 2s are 10^7/2
= 5^6 or 5,000,000.
Hope this helps.
-WonderGirl
Similar questions