[Number Theory]
Problem: A geometric sequence has 20 terms.

The sum of its first two terms is 40 .

The sum of its first three terms is 76 .

The sum of its first four terms is 130 .

Determine how many of the terms in the sequence are integers.

(A geometric sequence is a sequence in which each term after the first is obtained from the previous term by multiplying it by a constant. For example, $3,6,12$ is a geometric sequence with three terms.)

Solution: Since the sum of the first two terms is 40 and the sum of the first three terms is 76, then the third term is $76-40=36$.

Since the sum of the first three terms is 76 and the sum of the first four terms is 130, then the fourth term is $130-76=54$.

Since the third term is 36 and the fourth term is 54 , then the common ratio in the geometric sequence is $\frac{54}{36}=\frac{3}{2}$.

Therefore, the fifth term is $54 \cdot \frac{3}{2}=81$ and the sixth term is $81 \cdot \frac{3}{2}=\frac{243}{2}$.



Also, the second term is $36 \div \frac{3}{2}=36 \cdot \frac{2}{3}=24$ and the first term is $24 \div \frac{3}{2}=24 \cdot \frac{2}{3}=16$.

Thus, the first six terms of the sequence are $16,24,36,54,81, \frac{243}{2}$.

Since the first term equals $2^{4}$ and the common ratio is $\frac{3}{2}$, then the $n$th term in the sequence is $2^{4}\left(\frac{3}{2}\right)^{n-1}=\frac{3^{n-1}}{2^{n-5}}$.

When $n \geq 6$, this is a fraction whose numerator is odd and whose denominator is even, and so, when $n \geq 6$, the $n$th term is not an integer. (An odd integer is never divisible by an even integer.)

Therefore, there will be 5 integers in the sequence.
Suppose that $a$ is the first term and $r$ is the common ratio between consecutive terms (so that $a r$ is the second term, $a r^{2}$ is the third term, and so on).

From the given information, $a+a r=40$ and $a+a r+a r^{2}=76$ and $a+a r+a r^{2}+a r^{3}=130$.

Subtracting the first equation from the second, we obtain $a r^{2}=36$.

Subtracting the second equation from the third, we obtain $a r^{3}=54$.

Since $a r^{3}=54$ and $a r^{2}=36$, then $r=\frac{a r^{3}}{a r^{2}}=\frac{54}{36}=\frac{3}{2}$.

Since $a r^{2}=36$ and $r=\frac{3}{2}$, then $a\left(\frac{3}{2}\right)^{2}=36$ or $\frac{9}{4} a=36$ or $a=\frac{4}{9} \cdot 36=16$.

Since $a=16$ and $r=\frac{3}{2}$, then the first six terms of the sequence are 16, 24, 36, 54, 81, $\frac{243}{2}$. Since the first term equals $2^{4}$ and the common ratio is $\frac{3}{2}$, then the $n$th term in the sequence is $2^{4}\left(\frac{3}{2}\right)^{n-1}=\frac{3^{n-1}}{2^{n-5}}$.

When $n \geq 6$, this is a fraction whose numerator is odd and whose denominator is even, and so, when $n \geq 6$, the $n$th term is not an integer. (An odd integer is never divisible by an even integer.)

Therefore, there will be 5 integers in the sequence.

Final answer: 5