Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #20 Sep 27 2014 13:04:59
%S 2,3,7,19,139,829,3331,32941,176417,854929,2233531,12699571,47924959,
%T 763597201,5775760189
%N Smallest prime p such that p - 2^e is also prime in exactly n cases for nonnegative integers e.
%C The exponent e is obviously limited to 0 <= e <= log_2(p).
%C The sequence is obtained by building a greedy prime index inverse of A078687, which is 1, 2, 4, 8, 34, ..., followed by lookup in the primes, A000040.
%C From _Robert G. Wilson v_, Sep 12 2014: (Start)
%C 0: 2, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, …, ;
%C 1: 3, 5, 17, 29, 41, 53, 59, 89, 97, 137, 163, 179, 191, …, ;
%C 2: 7, 11, 13, 23, 31, 37, 43, 47, 67, 71, 73, 79, 101, …, ;
%C 3: 19, 61, 83, 131, 167, 227, 229, 241, 271, 293, 353, …, ;
%C 4: 139, 181, 199, 571, 601, 619, 677, 691, 1217, 1231, …, ;
%C 5: 829, 1487, 2131, 2341, 2551, 2971, 4051, 4261, 4583, …, ;
%C 6: 3331, 12109, 14551, 17393, 22279, 22307, 22741, …, ;
%C 7: 32941, 34369, 44029, 49433, 67189, 95717, 99833, …, ;
%C 8: 176417, 304771, 314723, 314779, 349667, 414707, …, ;
%C 9: 854929, 1297651, 1328927, 1784723, 2164433, 2488909, …, ;
%C 10: 2233531, 6026089, 7475389, 7623229, 9644911, …, ;
%C 11: 12699571, 18464123, 52849879, 78127339, 79303579, …, ;
%C 12: 47924959, 153309649, 204797059, 248685923, 273865219, …, ;
%C 13: 763597201, 1194032507, 1522018741, 1833343669, …, ;.
%C (End)
%e a(3) = 19 since 19-2^1=17, 19-2^3=11 & 19-2^4=3 and there exists no prime less than 19 which exhibits this characteristic.
%t f[n_] := Length@ Table[q = p - 2^exp; If[ PrimeQ@ q, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; t = Table[0, {20}]; p = 2; While[p < 100000001, a = f@ p; If[ t[[a]] == 0, t[[a]] = p; Print[{a, p}]]; p = NextPrime@ p]; t
%Y Cf. A078686.
%K nonn,more
%O 0,1
%A _Robert G. Wilson v_, Jul 09 2014
%E a(14) from _Robert G. Wilson v_, Sep 12 2014