An integer $a\ge1$ is called Aegean, if none of the numbers $a^{n+2}+3a^n+1$ with $n\ge1$ is prime. Prove that there are at least 500 Aegean integers in the set $\{1,2,\ldots,2018\}$. (Proposed by Gerhard Woeginger, Austria)
Problem
Source: Mediterranean 2018 P3 MMC
Tags: number theory, prime numbers, Mediterranean
30.07.2018 13:09
First of all, it is easy to see that all $a \equiv 1 (mod 5)$ work (with the exception of $a = 1$), as $a^{n+2} + 3a^n +1 \equiv 1 + 3 + 1 \equiv 0 (mod 5)$ and at the same time $a^{n+2} + 3a^n +1 > 5$. These numbers are $\left \lfloor \frac{2018}{5} \right \rfloor - 1$ in total, which is $402$. Now, all numbers $a \equiv -1 (mod 15)$ also work. This is because: 1. If $n \equiv 1 (mod 2)$, then $a^{n+2} + 3a^n +1 \equiv 2^{n+2} + 3*2^{n} + 1 \equiv 0 (mod 3)$. (since obviously $a \equiv 2 (mod 3)$) 2. If $n \equiv 0 (mod 2)$, then, since $a \equiv -1 (mod 5) \rightarrow a^2 \equiv 1 (mod 5)$, we get that $a^{n+2} + 3a^n +1 \equiv 0 (mod 5)$ (Obviously $a^{n+2} + 3a^n +1 > 5$, so it cannot be prime). Finally, it is easy to see that these numbers are $\left \lfloor \frac{2018}{15} \right \rfloor = 134$. Obviously, none of these numbers is $1 (mod 5)$, so they are all different from the $402$ we found earlier. So, we have found a total of $402 + 134 = 536 > 500$ Aegean numbers, which means we are done.
12.06.2020 13:06
Your solution's correct, you just have a small inaccuracy. The total number of positive integers between $1$ and $2018$ which are congruent to $1$ mod $5$, excluding $1$, is $403$, not $402$ (note that $6 = 1 + 5*1$ and $2016 = 1 + 5*403$, which shows there are $403$ of them). The reason you got $402$ is because the floor function you used to calculate the result does not account for the $1$, therefore you ought not to subtract one ($\left \lfloor{\frac{8}{5}}\right \rfloor = 1$, for example, if you want to find out how many integers there are that are between $1$ and $8$ that are congruent to $1$ mod $5$, and as you can see the floor function gives you one whereas you know that both $1$ and $6$ are such integers)