3. On the table, there are 130 different cards with numbers $502, 504, 506, \ldots, 758, 760$ (each card has exactly one number, and each number appears exactly once). In how many ways can 3 cards be chosen so that the sum of the numbers on the selected cards is divisible by 3?
Answer: 119282

Solution. The given numbers, arranged in ascending order, form an arithmetic progression with a difference of 2. Therefore, the remainders of these numbers when divided by 3 alternate. Indeed, if one of these numbers is divisible by 3, i.e., has the form $3k$, where $k \in \mathbb{N}$, then the next number is $3k+2$ - and it gives a remainder of 2 when divided by 3, followed by $3k+4$, which gives a remainder of 1 when divided by 3, and then $3k+6$, which is again divisible by 3. Thus, the remainders of the given numbers when divided by 3 follow the pattern $\ldots 0 ; 2 ; 1 ; 0 ; 2 ; 1 ; 0 \ldots$.

Among the given numbers, there are 44 that give a remainder of 1 when divided by 3 (they form the set $A=\{502 ; 508 ; 514 ; \ldots ; 760\}$), 43 numbers that are divisible by 3 ($B=\{504 ; 510 ; 516 ; \ldots ; 756\}$), and 43 numbers that give a remainder of 2 when divided by 3 ($C=\{506 ; 512 ; 518 ; \ldots ; 758\}$).

The sum of three numbers can be divisible by 3 in the following cases.

1) All three numbers give the same remainder when divided by 3. There are $C_{44}^{3}$ ways to choose 3 numbers from set $A$ and $C_{43}^{3}$ ways to choose 3 numbers from sets $B$ and $C$. In total, we get $\frac{44 \cdot 43 \cdot 42}{6} + 2 \cdot \frac{43 \cdot 42 \cdot 41}{6} = 13244 + 2 \cdot 12341 = 37926$ ways.
2) If not all remainders are the same, the only suitable case is when all three remainders are different, i.e., we must choose one number from each of the sets $A, B, C$. We get $44 \cdot 43 \cdot 43 = 81356$ ways.

In total, we get 119282 ways.