MathLabs

Problem 5

Find all triples (a,b,p)(a,b,p) of positive integers with pp prime and ap=b!+pa^p=b!+p
Step 5 of 6: Check the small primes p=2,3p=2,3 directly
(a,b,p)=(2,2,2) or (3,4,3)(a,b,p)=(2,2,2)\ \text{or}\ (3,4,3)
Detailed analysis

With a=pa=p, the equation becomes pp=b!+pp^p=b!+p. For p=2p=2, checking 2≤b≤32\le b\le3 gives only (a,b,p)=(2,2,2)(a,b,p)=(2,2,2) (since 22=4=2!+22^2=4=2!+2). For p=3p=3, checking 3≤b≤53\le b\le5 gives only (a,b,p)=(3,4,3)(a,b,p)=(3,4,3) (since 33=27=4!+33^3=27=4!+3).