login

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

Numbers of the form 2^k + prime, with k > 0.
4

%I #28 Feb 16 2020 00:46:27

%S 4,5,6,7,9,10,11,13,15,17,18,19,21,23,25,27,29,31,33,34,35,37,39,41,

%T 43,45,47,49,51,53,55,57,59,61,63,65,66,67,69,71,73,75,77,79,81,83,85,

%U 87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119

%N Numbers of the form 2^k + prime, with k > 0.

%C A039669 is included in this sequence.

%H Vincenzo Librandi, <a href="/A218044/b218044.txt">Table of n, a(n) for n = 1..1000</a>

%H Yong-Gao Chena and Xue-Gong Sunb, <a href="http://dx.doi.org/10.1016/j.jnt.2003.11.009">On Romanoff's constant</a>, Journal of Number Theory, Volume 106, Issue 2, June 2004, Pages 275-284.

%H Christian Elsholtz, Florian Luca, and Stefan Planitzer, <a href="https://doi.org/10.1007/s11139-017-9972-8">Romanov type problems</a>, The Ramanujan Journal 47.2 (2018): 267-289.

%H P. Erdõs, <a href="http://www.renyi.hu/~p_erdos/1950-07.pdf">On integers of the form 2^k + p and some related problems</a>, Summa Brasil. Math. 2 (1950), pp. 113-123.

%H N. P. Romanoff, <a href="http://gdz.sub.uni-goettingen.de/dms/resolveppn/?PPN=GDZPPN002276984">Über einige Sätze der additiven Zahlentheorie</a>, Math. Ann. 57 (1934) 668-678.

%e 5 = 3 + 2 that is, a prime and a power of 2.

%p q:= n-> ormap(isprime, [seq(n-2^k, k=1..ilog2(n))]):

%p select(q, [$0..200])[]; # _Alois P. Heinz_, Feb 14 2020

%t 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 *)

%o (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

%Y Cf. A080340, A039669, A118955 (allows k=0).

%K nonn,easy

%O 1,1

%A _Michel Marcus_, Oct 19 2012