login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest prime p such that 2n-p and 2n+p are both prime.
2

%I #4 Oct 01 2013 17:58:04

%S 5,7,11,11,13,17,17,23,23,29,31,37,37,43,41,43,47,53,53,59,67,67,71,

%T 71,79,89,83,89,101,97,101,101,109,107,131,113,127,131,127,131,137,

%U 137,179,149,157,157,193,191,167,179,179,181,193,193,191,193,197,211,227,211

%N Smallest prime p such that 2n-p and 2n+p are both prime.

%o (PARI) f(n) = for(p=1,n, for(x=1,n, y=x-p; z=x+p; if(isprime(y)&isprime(z)&isprime(x),print1(x",");break)))

%Y Cf. A098807.

%K easy,nonn

%O 2,1

%A _Cino Hilliard_, Oct 06 2004