A118955 Numbers of the form 2^k + prime.
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 51, 53, 54, 55, 57, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 79, 80, 81, 83, 84, 85, 87, 89, 90, 91, 93
Offset: 1
Keywords
References
- Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 87.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000.
- Christian Elsholtz and Jan-Christoph Schlage-Puchta, On Romanov's constant, Mathematische Zeitschrift, Vol. 288 (2018), pp. 713-724.
- Laurent Habsieger and Xavier-Francois Roblot, On integers of the form p + 2^k, Acta Arithmetica 122:1 (2006), pp. 45-50.
- J. Pintz, A note on Romanov's constant, Acta Mathematica Hungarica 112:1-2 (2006), pp. 1-14.
- F. Romani, Computations concerning primes and powers of two, Calcolo 20 (1983), pp. 319-336.
Programs
-
Haskell
a118955 n = a118955_list !! (n-1) a118955_list = filter f [1..] where f x = any (== 1) $ map (a010051 . (x -)) $ takeWhile (< x) a000079_list -- Reinhard Zumkeller, Jan 03 2014
-
Mathematica
Select[Range[100], (For[r=False; k=1, #>k, k*=2, If[PrimeQ[#-k], r=True]]; r)& ] (* Jean-François Alcover, Dec 26 2013, after Charles R Greathouse IV *)
-
PARI
is(n)=my(k=1);while(n>k,if(isprime(n-k),return(1),k*=2));0 \\ Charles R Greathouse IV, Mar 12 2008
-
PARI
list(lim)=my(v=List(),t=1); while(t
Charles R Greathouse IV, Aug 06 2021 -
Python
from itertools import count, islice from sympy import isprime def A118955_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda n: any(isprime(n-(1<A118955_list = list(islice(A118955_gen(),30)) # Chai Wah Wu, Nov 29 2023
Comments