The sequence 1,2,1,2,2,1,2,2,2,1,2,2,2,2,1,2,2,2,2,2,1, etc. consists of 1s separated by blocks of 2's with n 2's in the nth block. Find the sum of the first 1234 terms in the sequence.
2418 i guess
if you have 1234 2's you'd have 2468, but since there's about a 50 1's in there as well, you have to subtract the 1's
Subtract the ones? Wouldn't they also add to the total sum?
if you assume all the 1234 numbers are two, then you have to subtract the ones, because you have counted the 1s as 2s, and since a 2 is bigger then a 1, you'll have to get rid of the extras
Ah
So how many ones are there?
not sure exactly how many, but 50 should be about right probably
you get a whole lot of 2s so there's hardly any room for 1s past the first few
i tried to make a formula but i can't think of one
I got 2419 instead
f(n) = 1 if n = i(i+1)/2, and 2 if n = otherwise
1234 = i(i+1)/2 when solving, the nearest integer less than 1234 is 1225, which makes i = 49. So there are 49 1's, and 1185 2's (49)(1) + (1185)(2) = 2419
Join our real-time social learning platform and learn together with your friends!