Olympiad Maths Prep

Track / Stage 8 / 85 of 180 #1785 of 2000

Problem 1785

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.2 Prove it

Let pp be a prime number of the form 4k+14k+1. Show that i=1p1(2i2p2i2p)=p12.\sum^{p-1}_{i=1}\left( \left \lfloor \frac{2i^{2}}{p}\right \rfloor-2\left \lfloor \frac{i^{2}}{p}\right \rfloor \right) = \frac{p-1}{2}.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. Lemma 1: For any integer n n and any non-integer real number a a , we have a+na=n1 \lfloor a \rfloor + \lfloor n - a \rfloor = n - 1 .

2. Since p p is a prime number of the form 4k+1 4k + 1 , it is known that 1 -1 is a quadratic residue modulo p p . Thus, there exists an integer λ \lambda such that λ21(modp) \lambda^2 \equiv -1 \pmod{p} .

3. Since pλ p \nmid \lambda (because otherwise, we would have λ20(modp) \lambda^2 \equiv 0 \pmod{p} , contradicting λ21(modp) \lambda^2 \equiv -1 \pmod{p} ), multiplication with λ \lambda is a permutation of the nonzero residues modulo p p . Define a function L L from {1,2,,p1} \{1, 2, \ldots, p-1\} to {1,2,,p1} \{1, 2, \ldots, p-1\} by letting L(i) L(i) be the remainder of λi \lambda i upon division by p p . This function L L is a permutation of {1,2,,p1} \{1, 2, \ldots, p-1\} .

4. We have:
i=1p1(2i2p2i2p)=i=1p1(2(L(i))2p2(L(i))2p) \sum_{i=1}^{p-1} \left( \left\lfloor \frac{2i^2}{p} \right\rfloor - 2 \left\lfloor \frac{i^2}{p} \right\rfloor \right) = \sum_{i=1}^{p-1} \left( \left\lfloor \frac{2(L(i))^2}{p} \right\rfloor - 2 \left\lfloor \frac{(L(i))^2}{p} \right\rfloor \right)

5. For every i{1,2,,p1} i \in \{1, 2, \ldots, p-1\} , both integers i2 i^2 and 2i2 2i^2 are coprime with p p . Since L(i)λi(modp) L(i) \equiv \lambda i \pmod{p} , we have:
i2+(L(i))2i2+(λi)2=(1+λ2)i2(1+(1))i2=0(modp) i^2 + (L(i))^2 \equiv i^2 + (\lambda i)^2 = (1 + \lambda^2)i^2 \equiv (1 + (-1))i^2 = 0 \pmod{p}
Hence, i2+(L(i))2p \frac{i^2 + (L(i))^2}{p} is an integer. Applying Lemma 1 to n=i2+(L(i))2p n = \frac{i^2 + (L(i))^2}{p} and a=i2p a = \frac{i^2}{p} , we obtain:
i2p+i2+(L(i))2pi2p=i2+(L(i))2p1 \left\lfloor \frac{i^2}{p} \right\rfloor + \left\lfloor \frac{i^2 + (L(i))^2}{p} - \frac{i^2}{p} \right\rfloor = \frac{i^2 + (L(i))^2}{p} - 1
Equivalently,
i2p+(L(i))2p=i2p+(L(i))2p1 \left\lfloor \frac{i^2}{p} \right\rfloor + \left\lfloor \frac{(L(i))^2}{p} \right\rfloor = \frac{i^2}{p} + \frac{(L(i))^2}{p} - 1

6. Since 2i2+(L(i))2p 2 \cdot \frac{i^2 + (L(i))^2}{p} is an integer, while 2i2p \frac{2i^2}{p} is a non-integer, applying Lemma 1 to n=2i2+(L(i))2p n = 2 \cdot \frac{i^2 + (L(i))^2}{p} and a=2i2p a = \frac{2i^2}{p} , we obtain:
2i2p+2i2+(L(i))2p2i2p=2i2+(L(i))2p1 \left\lfloor \frac{2i^2}{p} \right\rfloor + \left\lfloor 2 \cdot \frac{i^2 + (L(i))^2}{p} - \frac{2i^2}{p} \right\rfloor = 2 \cdot \frac{i^2 + (L(i))^2}{p} - 1
Equivalently,
2i2p+2(L(i))2p=2i2p+2(L(i))2p1 \left\lfloor \frac{2i^2}{p} \right\rfloor + \left\lfloor \frac{2(L(i))^2}{p} \right\rfloor = \frac{2i^2}{p} + \frac{2(L(i))^2}{p} - 1

7. Now, we compute:
i=1p1(2i2p2i2p)=12(i=1p1(2i2p2i2p)+i=1p1(2(L(i))2p2(L(i))2p)) \sum_{i=1}^{p-1} \left( \left\lfloor \frac{2i^2}{p} \right\rfloor - 2 \left\lfloor \frac{i^2}{p} \right\rfloor \right) = \frac{1}{2} \left( \sum_{i=1}^{p-1} \left( \left\lfloor \frac{2i^2}{p} \right\rfloor - 2 \left\lfloor \frac{i^2}{p} \right\rfloor \right) + \sum_{i=1}^{p-1} \left( \left\lfloor \frac{2(L(i))^2}{p} \right\rfloor - 2 \left\lfloor \frac{(L(i))^2}{p} \right\rfloor \right) \right)
Using the fact that L L is a permutation:
=12i=1p1((2i2p+2(L(i))2p)2(i2p+(L(i))2p)) = \frac{1}{2} \sum_{i=1}^{p-1} \left( \left( \left\lfloor \frac{2i^2}{p} \right\rfloor + \left\lfloor \frac{2(L(i))^2}{p} \right\rfloor \right) - 2 \left( \left\lfloor \frac{i^2}{p} \right\rfloor + \left\lfloor \frac{(L(i))^2}{p} \right\rfloor \right) \right)
Using the results from steps 5 and 6:
=12i=1p1((2i2p+2(L(i))2p1)2(i2p+(L(i))2p1)) = \frac{1}{2} \sum_{i=1}^{p-1} \left( \left( \frac{2i^2}{p} + \frac{2(L(i))^2}{p} - 1 \right) - 2 \left( \frac{i^2}{p} + \frac{(L(i))^2}{p} - 1 \right) \right)
Simplifying:
=12i=1p11=12(p1)=p12 = \frac{1}{2} \sum_{i=1}^{p-1} 1 = \frac{1}{2} (p - 1) = \frac{p - 1}{2}

The final answer is p12 \boxed{ \frac{p-1}{2} }

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.