12

As the title says,

Find all positive integers $n$ for which $(n-1)!+1$ is a power of $n$.

The solutions I've found are $\{2,3,5\}$ (thanks Brandon!), but I'm having difficulties proving that these are the only ones. What I've got so far is that $n$ must be prime since $(n-1)!+1$ would not be congruent to $n$ if $n$ were composite.

Carolus
  • 3,279

2 Answers2

1

Well, for primes $p < 1290,$ those for which $$ 1 + (p-1)! \equiv 0 \pmod{p^2}$$ are the three $$\{ 5, \; \; 13, \; \; 563 \}$$

As soon as $p \geq 7,$ we have $(p-1)! > p^3,$ so we need $ 1 + (p-1)! \equiv 0 \pmod{p^3},$ and, in fact, $ 1 + (p-1)! \equiv 0 \pmod{p^4}.$ Quite rare.

Will Jagy
  • 139,541
  • On the other hand, $(13-1)!+1=13^2 \times 2834329$ – J. M. ain't a mathematician Dec 18 '11 at 09:20
  • @J.M. yes, I factored these for $p \leq 61$ in gp-Pari, I don't see any chance for more solutions, which is what the large unpredictable prime factor with $p=13$ tells me. I know $v_{563} (1 + 562!) \geq 2$ but not the exact value. – Will Jagy Dec 18 '11 at 09:29
1

This is really an old problem in ML. Note that, the equation doesn't hold for primes $>5$ which is in fact the Liouvilles'theorem