Maths Olympiad Prep

Track / Stage 6 / 103 of 400 #1103 of 1964

Problem 1103

National olympiad, first round
Number theory Difficulty 6.1 Prove it

Let's prove that 7161!+171 \mid 61!+1.

---

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.

---

Let's prove that 7161!+171 \mid 61!+1.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

I. Solution. Since 71 is a prime number, according to Wilson's theorem (see, for example, the university textbook "Number Theory" by Freud R. and Gyarmati E.), 70!+170!+1 is divisible by 71. It is therefore sufficient to show that 61! gives the same remainder when divided by 71 as 70!. Let's examine the product A=626370A=62 \cdot 63 \cdot \ldots \cdot 70 accordingly.

A(719)(718)(717)(711)(9)(8)(7)(1)==72(7!)7!=70721(mod71) \begin{aligned} A & \equiv(71-9) \cdot(71-8) \cdot(71-7) \cdot \ldots \cdot(71-1) \equiv(-9) \cdot(-8) \cdot(-7) \cdot \ldots \cdot(-1)= \\ & =72 \cdot(-7!) \equiv-7!=-70 \cdot 72 \equiv 1 \quad(\bmod 71) \end{aligned}

Thus, 70!=A61!61!(mod71)70!=A \cdot 61!\equiv 61!(\bmod 71), which is what we wanted to prove.

Remark. The received solutions can be categorized into two groups: those using Wilson's theorem and those in which the remainder of 61! was calculated in multiple steps. The advantage of the latter solution is that it can provide all numbers nn for which 71 is a divisor of n!+1nn!+1-n. These nn values are 7, 9, 19, 51, 61, 63. This was pointed out by Ágnes Bartha, Tamás Birkner, Tímea Haszpra, and Ferenc Visnovitz in their papers.

II. Solution. Let's calculate for which nn numbers n!+1n!+1 is divisible by 71 (nn is a positive integer). The remainder of n!n! when divided by 71, denoted as rnr_{n}, can be obtained from the remainder of (n1)!(n-1)! when divided by 71, denoted as rn1r_{n-1}, as follows: rn=rn1n71[rn1n71]r_{n}=r_{n-1} \cdot n-71\left[\frac{r_{n-1} \cdot n}{71}\right], where [x][x] denotes the integer part of xx.

| nn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7\mathbf{7} | 8 | 9\mathbf{9} | \ldots | 19\mathbf{1 9} | \ldots | 51\mathbf{5 1} | \ldots | 61\mathbf{6 1} | 62 | 63\mathbf{6 3} |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| rnr_{n} | 1 | 1 | 2 | 6 | 24 | 49 | 10 | 70\mathbf{7 0} | 63 | 70\mathbf{7 0} | \ldots | 70\mathbf{7 0} | \ldots | 70\mathbf{7 0} | \ldots | 70\mathbf{7 0} | 9 | 70\mathbf{7 0} |

Numbers that give a remainder of 70 when divided by 71, when 1 is added to them, result in numbers divisible by 71. These are the numbers mentioned in the remark, among which the last one before 61 is 61. This also proves the statement of our problem.

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