# Show that if $p_1^4 + \cdots + p_{31}^4$ is divisible by $30$, then three consecutive primes are included

Let $p_1<p_2<\cdots<p_{31}$ be prime numbers. Prove that if $p_1^4+p_2^4+\cdots+p_{31}^4$ is divisible by $30$, then there are three consecutive prime numbers in the sum.

Consecutive prime numbers in the sense of $2,3,5,7,11,13,17,19,23,27,29,31, \ldots$ and so on.

What I tried:

$$S=p_1^4+p_2^4+\cdots+p_{31}^4$$

$S$ must be divisible by $3$ and $10.$

The sum of 3 arbitrary prime numbers, greater than 3, to the fourth power is divisible by 3, so the sum of 27 arbitrary prime numbers, grater than 3, to the fourth power is divisible by 3.

The sum of 3,5,7,11 raised to the fourth power is divisible by 3. Yes but the sum of 3,5,7,11 raised to fourth power plus the sum of 27 prime numbers, grater than 11, to the fourth power is not divisible by 10!

Could someone give me an idea!

• Hint 1: 10 = 2.5. Hint 2: 2 is prime Hint: 3 10 is an even number. Hint 4: 31 is an odd number. – fleablood Jul 24 '18 at 23:56
• You have number 27 on the list of consecutive primes ... typo I guess – usiro Jul 25 '18 at 17:07

As there are an odd number of primes appearing in the sum, and the sum is to be even, we must have that $p_1 = 2$. Considering mod $30$, we must then have that

$$p_2^4 + \cdots + p_{31}^4 \equiv 14 \pmod {30}.$$

Working mod $3$, we must then have that

$$p_2^4 + \cdots + p_{31}^4 \equiv 2 \pmod {3}.$$

There are $30$ terms appearing in the sum. Every prime $p > 3$ satisfies $p^4 \equiv 1 \bmod 3$, and $30 \cdot 1 \equiv 0 \bmod 3$. So $p_2 = 3$.

Similar analysis mod $5$ will show that $p_3 = 5$, and so the primes must include $2,3$, and $5$.

Hint: You need $2$ to make the sum even, $3$ to make the sum divisible by $3$, and $5$ to make the sum divisible by $5$.