Open-access mathematical research insights
About Contact
Home / Erdos Problems / Problem #478

Problem #478: Let $p$ be a prime and\[A_p = \{ k! \pmod{p} : 1\leq k

Let $p$ be a prime and\[A_p = \{ k! \pmod{p} : 1\leq k

Problem Statement

Let $p$ be a prime and\[A_p = \{ k! \pmod{p} : 1\leq k<p\}.\]Is it true that\[\lvert A_p\rvert \sim (1-\tfrac{1}{e})p?\]
Categories: Number Theory Factorials

Progress

Since $A_p/A_p=\{1,\ldots,p-1\}$ it follows that $\lvert A_p\rvert \gg p^{1/2}$. The best known lower bound is due to Grebennikov, Sagdeev, Semchankau, and Vasilevskii [GSSV24],\[\lvert A_p\rvert \geq (\sqrt{2}-o(1))p^{1/2},\]which follows from proving that $\lvert A_pA_p\rvert=(1+o(1))p$.

Wilson's theorem implies $(p-2)!\equiv 1\pmod{p}$, and hence $\lvert A_p\rvert\leq p-2$. It is open whether even $\lvert A_p\rvert<p-2$. This has been verified for all primes $p<10^9$ (see [GSSV24]). Results on $\lvert A_p\rvert$ on average were obtained by Klurman and Munsch [KlMu17].

In Hardy and Subbarao [HaSu02] they raise the question, discussed in conversation with Erdős, of whether $\lvert A_p\rvert=p-2$ for many values of $p$. (This is also mentioned in problem A2 of Guy's collection.) Such a prime must be $\equiv 1\pmod{4}$. The answer is surely only finitely many (and probably only $p=5$, given the data mentioned above).

Source: erdosproblems.com/478 | Last verified: January 15, 2026

Stay Updated

Get weekly digests of new research insights delivered to your inbox.