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.

MV
Answered by Marios V. STEP tutor

1931 Views

See similar STEP University tutors

Related STEP University answers

All answers ▸

Show that substituting y = xv, where v is a function of x, in the differential equation "xy(dy/dx) + y^2 − 2x^2 = 0" (with x is not equal to 0) leads to the differential equation "xv(dv/dx) + 2v^2 − 2 = 0"


What is the largest positive integer that always divides n^5-n^3 for n a natural number.


Let y=arcsin(x)/sqrt(1-x^2). Show that (1-x^2) y'-xy-1=0, and prove that, for all integers n>=0, (1-x^2)y^{n+2}-(2n+3)xy^{n+1} -(n+1)^2 y^{n}=0. (Superscripts denote repeated differentiation)


Differentiate: f(x)=(ax^2 + bx + c) ln(x + (1+x^2)^(1/2)) + (dx + e) (1 + x^2)^(1/2). Hence integrate i) ln(x + (1 + x^2)^(1/2)), ii) (1 + x^2)^(1/2), iii) x ln(x + (1 + x^2)^(1/2)).


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2025 by IXL Learning