login

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

Least prime p not already included in the sequence such that p + 2n is a prime.
2

%I #8 Feb 09 2014 19:55:33

%S 3,7,5,11,13,17,23,31,19,41,37,29,47,43,53,71,67,61,59,73,89,83,103,

%T 79,101,97,109,107,139,113,131,127,157,173,163,151,137,181,149,191,

%U 199,167,197,193,179,239,223,211,233,283,229,227,241,251,257,271,269

%N Least prime p not already included in the sequence such that p + 2n is a prime.

%C Includes only odd numbers. The sequence includes all prime numbers since, for any prime, another prime exists differing by an even number.

%p a(7)=23 since 23+2*7 = 23+14 = 37 is prime.

%t t = {}; Do[p = 3; While[! (PrimeQ[p + 2 n] && ! MemberQ[t, p]), p = NextPrime[p]]; AppendTo[t, p], {n, 100}]; t (* _T. D. Noe_, Feb 04 2014 *)

%K nonn

%O 1,1

%A _Carmine Suriano_, Feb 03 2014