# A number theoretic example in which both "if" and "only if" are near misses

Consider $2^n-1$. Based on checking a few small numbers for $n$ (in fact, the first ten natural numbers) we might "conclude" that "$n$ is prime if and only if $2^n-1$ is prime." However, further investigation shows that for $n=11$, $2^n-1$ is not prime. Thus our claim that "if $n$ is prime then $2^n-1$ is prime" is a near miss. However, we can prove its reverse, that "if $2^n-1$ is prime then $n$ is prime".

I am looking for some elementary number theoretic examples that both directions of our eventually fake biconditional are near misses.

• $n=11$ is too low for a near miss. For really impressive near misses see math.stackexchange.com/questions/514/….
– lhf
Commented Oct 27, 2016 at 15:12
• @lhf I know. I had the same feeling when I read John Stillwell in his book "Elements of number theory" mentions {$n^2+n+41$} as a near miss for generating prime numbers. Commented Oct 27, 2016 at 15:18
• Now posted also on MO: A conjecture in which both “if” and “only if” are near misses. Commented Nov 29, 2017 at 16:21
• @MartinSleziak Thank you, Martin, for adding this :) Commented Nov 30, 2017 at 7:24