STEP 2 - 2018, Q6i): Find all pairs of positive integers (n, p), where p is a prime number, that satisfy n! + 5 = p .

The key observation here is that all numbers below n, by definition, divide n!=nx(n-1)x(n-2)x...x1.So in particular, if n greater or equal to 5, 5 divides n!, and thus is divides n!+5.Hence, if n!+5=p and n greater or equal o 5, 5 must divide p.
But then p must be in fact equal to 5, as prime numbers are divided by only 1 and themselves.Of course this gives n!+5=5 and so n!=0 which clearly can't happen.
OK, so we can't have 5 greater or equal to 5.
We can check "n= 1 or 2 or 3 or 4" manually.
n=1 gives p=6=2x3, not prime.
n=2 gives p=7. prime.
n=3 gives p=11, prime.
n=4 gives p=29, prime.
So the only pairs are: (2,7),(3,11),(4,29).
Remember: if you can solve the problem for every case except from a few, you can later go back fill the missing cases manually.

Answered by Marios V. STEP tutor

1117 Views

See similar STEP University tutors

Related STEP University answers

All answers ▸

Find all positive integers n such that 12n-119 and 75n-539 are both perfect squares. Let N be the sum of all possible values of n. Find N.


How would you prove the 'integration by parts' rule?


(x_(n+1), y_(n+1))=(x_n^2-y_n^2+a, 2x_ny_n +b+2). (i) Find (x1, y1) if (a, b)=(1,-1) and (x_n, y_n) is constant. (ii) Find (a, b) if (x1, y1)=(-1,1) and (x_n, y_n) has period 2.


Find h(x), for x≠0, x≠1, given that: h(x)+h(1/(1−x))=1−x−1/(1−x)


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy