OFFSET
1,1
COMMENTS
A039669 is included in this sequence.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Yong-Gao Chena and Xue-Gong Sunb, On Romanoff's constant, Journal of Number Theory, Volume 106, Issue 2, June 2004, Pages 275-284.
Christian Elsholtz, Florian Luca, and Stefan Planitzer, Romanov type problems, The Ramanujan Journal 47.2 (2018): 267-289.
P. Erdõs, On integers of the form 2^k + p and some related problems, Summa Brasil. Math. 2 (1950), pp. 113-123.
N. P. Romanoff, Über einige Sätze der additiven Zahlentheorie, Math. Ann. 57 (1934) 668-678.
EXAMPLE
5 = 3 + 2 that is, a prime and a power of 2.
MAPLE
q:= n-> ormap(isprime, [seq(n-2^k, k=1..ilog2(n))]):
select(q, [$0..200])[]; # Alois P. Heinz, Feb 14 2020
MATHEMATICA
nn = 119; ps = Prime[Range[PrimePi[nn]]]; p2 = 2^Range[Log[2, nn]]; u = {}; Do[u = Union[u, ps + p2[[i]]], {i, Length[p2]}]; Select[u, # <= nn &] (* T. D. Noe, Oct 19 2012 *)
PROG
(PARI) isok(n) = {forprime(p=2, n, my(d = n - p); if ((d==2) || (ispower(d, , &k) && (k==2)), return(1)); ); 0; } \\ Michel Marcus, Apr 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, Oct 19 2012
STATUS
approved