1,1

Numbers n such that a(n-1)=a(n+1)=n are A025584 (primes p such that p-2 is not a prime). - Rick L. Shepherd, Aug 23 2004

Table of n, a(n) for n=1..67.

a(n) = min(A034694(n), A038700(n)) for all n >= 1. - Rick L. Shepherd, Aug 23 2004

(PARI) a(n) = forprime(p=2, , if (!((p+1) % n) || !((p-1) % n), return (p))); \\ Michel Marcus, Aug 08 2014

Cf. A093869.

Cf. A034694 (Smallest prime == 1 (mod n)), A038700 (Smallest prime == -1 (mod n)).

Sequence in context: A264766 A251090 A078331 * A194603 A183465 A223168

Adjacent sequences: A093865 A093866 A093867 * A093869 A093870 A093871

nonn

Amarnath Murthy, Apr 20 2004

More terms from Rick L. Shepherd, Aug 23 2004

approved