I have a function called P(x), which can test if a number is prime. P(x) outputs 1 if x is prime, and 0 if it is not. I have the following conditions for some number "n":
p(n) = 1
p(n-1) = 1
Is there only one number that has the properties of ? If so, enter the number, if not enter 0.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Speak of n − 1 ,remember the parity change & rules of prime number
In n − a the parity will change if a odd and stay if a even.Since 1 is odd,so the parity will change.
The rules of prime numbers is they only divisible by 1 & itself.Since even numbers also divisible by 2,so not even numbers but only 2 satisfies because divisible by 2 is divisible itself.So the answer is 2 + 1 = 3