1. For n a positive integer, n! = 1 $\cdot$ 2 $\cdot$ 3 $\dots$ (n - 1) $\cdot$ n is the product of the positive integers from 1 to n. Determine, with proof, all positive integers n for which n! + 3 is a power of 3.
Problem
Source: IrMO 2022
Tags: number theory, factorial
08.05.2022 13:01
$9\nmid n!\Rightarrow n<6$ so $n=3,4$
08.05.2022 13:01
We have given a pair $(m,n)$ of positive integers satisfying the equation $(1) \;\; n! + 3 = m^2$. If $n \geq 5$, then $m^2 \equiv 3 \pmod{5}$ by equation (1), which is impossible since $k^2 \equiv 0,1,4 \pmod{5}$ when $k \in \mathbb{N}$. This contradiction implies $m \leq 4$, which according to equation (1) give us $n! = m^2 - 3 \in \{2^2 - 3, 3^2 - 3, 4^2 - 3\} = \{1,6,13\}$. Consequently equation (1) has exactly two solutions, namely $(m,n) = (2,1), (3,3)$.
08.05.2022 13:24
Suppose $n!+3=3^a$ where $a\in \mathbb{N}$ $Case 1: n\geq 6$ $\therefore 6!|n! \Rightarrow 9|n! \Rightarrow n!+3\equiv 3(mod 9) \Rightarrow 3^a\equiv 3(mod 9).$ So $9$ does not divide $3^a$ $\Rightarrow a<2 \Rightarrow a=1\Rightarrow n!+3=3\Rightarrow n!=0$ but this is impossible!! Contradiction!!! $Case 2: n\leq5$ Trying all the values, we get $n=3, n=4$ are the only solutions.($\because n=3\Rightarrow n!+3=9=3^2; n=4\Rightarrow n!+3=27=3^3$) So we are done!!
20.05.2022 09:55
Solar Plexsus wrote: We have given a pair $(m,n)$ of positive integers satisfying the equation $(1) \;\; n! + 3 = m^2$. If $n \geq 5$, then $m^2 \equiv 3 \pmod{5}$ by equation (1), which is impossible since $k^2 \equiv 0,1,4 \pmod{5}$ when $k \in \mathbb{N}$. This contradiction implies $m \leq 4$, which according to equation (1) give us $n! = m^2 - 3 \in \{2^2 - 3, 3^2 - 3, 4^2 - 3\} = \{1,6,13\}$. Consequently equation (1) has exactly two solutions, namely $(m,n) = (2,1), (3,3)$. It's n!+3=3^m though. And also, 3^5 = 3(mod 5)