Find the number of terms common in two sequences

The question is: For how many $n\ge1$ is $\frac{n(n+1)}{2}$ a multiple of $3$ and $\le 600$?

We first check that $\frac{n(n+1)}{2}\le 600$ iff $n\le 34$ (this is because $\lfloor\sqrt{1200}\rfloor = 34$). Next, the integer $\frac{n(n+1)}{2}$ is a multiple of $3$ iff $n$ or $n+1$ is a multiple of $3$, that is unless $n\equiv 1\pmod 3$. Thus two thirds of the $33$ numbers $n=1,\ldots, 33$ lead to a common term. The remaining $n=34$ is $\equiv 1\pmod 3$, so does not add another solution. Thus the answer is $22$.


First sequence : triangle numbers Second Sequence : multiples of 3

This is basically finding triangle numbers that are multiples of 3 . now observing pattern . 1,3,6,10,15,21,28,36,45,55,66,78 ....

PATTERN OBSERVATION :

For every 3 consecutive terms, 2 terms are multiples of 3

Note: multiples of 3 are only till 600 , so triangle numbers after 600 are to be eliminated . as triangle number of 34 ( 34th term in 1 st sequence) is 595 <600

triangle number of 33 ( 33rd term in 1 st sequence) is 561 which is a multiple of 3 .

so we should stop here .

so till n=33 , we have 11 triplets(because $ 11 \times 3 = 33 $ ) , in each triplets we have 2 numbers which are divisible by 3 (as per our observation), so $11 *2$ = $22$ is the answer