OFFSET
1,1
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Write n = k + m with 2^k + m prime, a message to Number Theory List, Nov. 16, 2013.
Z.-W. Sun, On a^n+ bn modulo m, arXiv:1312.1166 [math.NT], 2013-2014.
Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641 [math.NT], 2014-2015.
EXAMPLE
a(1) = 5 since 5 = 2^2 + 1 is a prime with 1 < 2^2, and 2^0 + 3 = 2^1 + 2 = 4 is composite.
a(3) = 13 since 13 = 2^3 + 5 is a prime with 5 < 2^3, and 2^0 + 8 = 2^1 + 7 = 9 and 2^2 + 6 = 10 are both composite.
MATHEMATICA
p[n_]:=p[n]=Prime[n]
x[n_]:=x[n]=Floor[Log[2, p[n]]]
y[n_]:=y[n]=p[n]-2^(x[n])
n=0; Do[Do[If[PrimeQ[2^(x[k]-a)+y[k]+a], Goto[aa]], {a, 1, x[k]}]; n=n+1; Print[n, " ", p[k]]; Label[aa]; Continue, {k, 1, 283}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 26 2015
STATUS
approved