Find the number of common terms in the two series $S_1$ and $S_2$
$$S_1: 1,3,6,10, \dots, 200$$ $$S_2: 3,6,9,12,15, \dots,200$$
Is there any easy approach for finding the common terms in these two series?
Find the number of common terms in the two series $S_1$ and $S_2$
$$S_1: 1,3,6,10, \dots, 200$$ $$S_2: 3,6,9,12,15, \dots,200$$
Is there any easy approach for finding the common terms in these two series?
On
S2 is a pretty simple pattern, so the easiest way to me seems to find all elements of $S1$ that are divisible by 3 (and less than the largest element of $S2$, 600). A good way to do that is to only look at the remainders after division by 3. Notice now that S1 is periodic, because you are adding the terms 2,0,1, repeatedly to get the pattern 1,0,0,1,0,0,1,0,0,1. Each 0 is going to be divisible by 3, so we can generate these by plugging in the index of the 0s in the list into the equation n(n+1)/2. (for example the first 0 is the second in the list and corresponds to 2*3/3=3).
On
By brute force:
"Steal" the triangular numbers in range $[3,600]$ from Wikipedia and select the multiples of $3$:
$$\color{green}{3}, \color{green}{6}, 10, \color{green}{15}, \color{green}{21}, 28, \color{green}{36}, \color{green}{45}, 55, \color{green}{66}, \color{green}{78}, 91, \color{green}{105}, \color{green}{120}, 136, \color{green}{153}, \color{green}{171}, 190, \color{green}{210}, \color{green}{231}, 253, \color{green}{276}, \color{green}{300}, 325, \color{green}{351}, \color{green}{378}, 406, \color{green}{435}, \color{green}{465}, 496, \color{green}{528}, \color{green}{561}, 595.$$
For the same "price", you get the pattern.
HINT
After the first 5 terms, $S_1 < S_2$ and $S_2$ is really a set of all multiples of 3. Now $S_1(n) = 1 +2 +\ldots + n = n(n+1)/2$ and you seek the number of these up to $600$ which is divisible by 3.