Find the total number of primes $p<100$ such that $\lfloor (2+\sqrt{5})^p \rfloor-2^{p+1}$ is divisible by $p$. Here $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$.
Problem
Source: 2020HKTST1 Q4
Tags: number theory, prime numbers, floor function
24.08.2019 14:30
https://artofproblemsolving.com/community/c6h1407686p7893108
24.08.2019 15:02
For $p=2$ we have $17 < (2+\sqrt{5})^2 < 18$ so $p=2$ does not work. We claim the quantity is divisible by $p$ though for any odd prime $p$. Indeed, the quantity is equal to \[ \left( 2+\sqrt5 \right)^p + \left( 2-\sqrt5 \right)^p - 4. \]Then $\alpha = 2+\sqrt5$ and $\beta = 2-\sqrt5$ are either elements of $\mathbb F_p$, or $\mathbb F_p$-Galois conjugates lying in $\mathbb F_{p^2}$ (according to whether $\left( \frac5p \right)=+1$ or not). Thus either $\alpha^p = \alpha$ and $\beta^p = \beta$, or $\alpha^p = \beta$ and $\beta^p = \alpha$. Either way the quantity actually equals $\alpha + \beta - 4 = 0$, proving the claim. The number of odd primes less than $100$ is $24$.
24.08.2019 18:01
v_Enhance wrote: Then $\alpha = 2+\sqrt5$ and $\beta = 2-\sqrt5$ are either elements of $\mathbb F_p$, or $\mathbb F_p$-Galois conjugates lying in $\mathbb F_{p^2}$ (according to whether $\left( \frac5p \right)=+1$ or not). Thus either $\alpha^p = \alpha$ and $\beta^p = \beta$, or $\alpha^p = \beta$ and $\beta^p = \alpha$. Personally, I feel a little queasy when taking an expression in the reals and transferring it to $\mathbb{F}_p$ or its extensions without being precise about what is really happening: we are applying the homomorphism $\mathbb{Z}[\sqrt{5}] \to \mathbb{F}_{p^2}$ given by $a + b\sqrt{5} \mapsto a + b\alpha$, where $\alpha^2 = 5$ in $\mathbb{F}_{p^2}$. We know $\left( 2+\sqrt5 \right)^p + \left( 2-\sqrt5 \right)^p - 4$ is an integer, and when we show that it vanishes under the homomorphism we know that integer is divisible by $p$. I guess for those already familiar with finite fields this step is intuitive and implied, but I think it's a subtle point that should be mentioned to those seeing this for the first time. More generally, if $a_1, \dots, a_n$ are roots (in $\mathbb{C}$, say) of $f \in \mathbb{Z}[x]$, then $a_1^p + \dots + a_n^p$ is an integer congruent to $a_1 + \dots + a_p$ modulo $p$.
24.09.2019 06:01
The above idea can also be phrased in terms of quotienting by the (maximal) ideal $p\mathbb Z[\sqrt 5]$; of course the quotient map is precisely the homomorphism $\mathbb Z[\sqrt 5]\to \mathbb F_{p^2}$, but the advantage of phrasing this in terms of ideals rather than finite fields is that we speak of rings more broadly than $\mathbb Z[\sqrt 5]$.
24.10.2019 18:01
This trick has become very standard nowadays... Notice that, for $p$ odd, $[(\sqrt{5}+2)^p]=(\sqrt{5}+2)^p-(\sqrt{5}-2)^p=2 \cdot (\sum \binom{p}{2k+1} 5^{\frac{p-(2k+1)}2} \cdot 2^{2k+1})$ Clearly, as $p$ is prime, $\binom{p}{l} \equiv 0 \pmod{p}$ for $0<l<p$. Thus $2 \cdot (\sum \binom{p}{2k+1} 5^{\frac{p-(2k+1)}2} \cdot 2^{2k+1}) \equiv 2 \cdot 2^p \equiv 2^{p+1} \pmod{p}$. Hence, for all odd primes $p$, $[ (2+\sqrt{5})^p ]-2^{p+1} \equiv 0 \pmod{p}$, and as it's easy to check $p=2$ doesn't work, our answer is $25-1=24$.
02.06.2020 11:08
Where I can learn more about the applications of abstract algebra in olympiad problems? I recently learned about group theory and fields
15.01.2023 17:35
It turns out that every prime other than $2$ divides the quantity lmao. It's easy to check that $p=2$ fails so restrict the problem to $p \geq 3$. Since $\sqrt{5}-2<1$, the expression actually equals $$(2+\sqrt{5})^p+(2-\sqrt{5})^p-2^{p-1}=2\sum_{i=0}^{\frac{p-1}{2}} \binom{p}{2i}2^{p-2i}5^i-2^{p+1},$$which is congruent to $2\cdot 2^p-2^{p+1} \equiv 0 \pmod{p}$, so we're done. $\blacksquare$
15.01.2025 09:16
Here we go: Note that: $p=2$ doesn't work. Let $p$ denote an odd prime. Notice that: $$\lfloor (2+\sqrt{5})^p \rfloor-2^{p+1} = (2+\sqrt{5})^p+(2-\sqrt{5})^p-2^{p+1}.$$ (One way to finish fast is to plug into binomial theorem and note that it's congruent to $0 \pmod p$. Since I was told to use Galois theory, we use it). Let $\alpha = 2+\sqrt{5}, \beta = 2-\sqrt{5}$. Notice that, we have two cases: Case-1: $5$ is a quadratic residue $\pmod p$: Then we have $\alpha , \beta \in \mathbb F_p$ and thus $\alpha^p \equiv \alpha \pmod p, \beta^p \equiv \beta \pmod p$. Case-2: $5$ is not a quadratic residue $\pmod p$: Then, we note that: $\alpha^p \equiv \beta \pmod p$ (this is true due to Frobenius endomorphism). Similarly, $\beta^p \equiv \alpha \pmod p$. Either way, we get: $\lfloor (2+\sqrt{5})^p \rfloor-2^{p+1} \equiv \alpha + \beta - 4 \equiv 0 \pmod p$ and we are done.