All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Add to Factorial, Get Perfect Power (Posted on 2025-02-21) Difficulty: 3 of 5
Find all possible pairs (n, k) of positive integers that satisfy this equation:

n! + n = n^k

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Analytic Solution Comment 2 of 2 |
Lets start by taking care of the edge cases n=0 and n=1
0! + 0 = 0 and 1! + 1 = 1 are false so no solutions here.
Then n>=2, so dividing by n or n-1 is now valid.

Now we can start rearranging things a bit
n*(n-1)! = n*(n^(k-1) - 1)
Now divide out the n
(n-1)! = n^(k-1) - 1
Take this equation mod n and we get
(n-1)! = -1 mod n
By Wilson's Theorem n is prime.

Now lets go further and factor out n-1
(n-1)*(n-2)! = (n-1)*[n^(k-2) + n^(k-3) + ... + n + 1]
Then divide out the n-1
(n-2)! = n^(k-2) + n^(k-3) + ... + n + 1
Note the right side contains k-1 terms.

We know that n is prime, lets assume n>=7.  Now take both sides mod n-1.  Then
(n-2)! = k-1 mod n-1
n-1 is a composite number >=6. Then also by Wilson's theorem (n-2)! = 0 mod n-1
Then k-1 = 0 mod n-1

k obviously needs to be greater than 1.  Then the smallest k is k=n.  Circling back to the original equation then we must have n! + n = n^n
But n^n grows so much faster than n! there are clearly no solutions with n>=7.

n is prime and less than 7, so there are only three candidates: n=2, n=3 and n=5.
If n=2 then 2!+2 = 2^k, then k=2.
If n=3 then 3!+3 = 3^k, then k=2.
If n=5 then 5!+5 = 5^k, then k=3.
All possible pairs (n, k) of positive integers that satisfy the given equation are (2, 2), (3, 2), and (5,3).

  Posted by Brian Smith on 2025-02-21 14:03:43
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information