The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367186 Numbers that can be written as 2^k + prime in more than one way. 1
4, 6, 7, 9, 11, 13, 15, 18, 19, 21, 23, 25, 27, 31, 33, 35, 37, 39, 43, 45, 47, 49, 51, 55, 57, 61, 63, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 91, 93, 95, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 121, 123, 125, 129, 131, 133, 135, 139, 141, 143, 145, 147, 151, 153, 155 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers m such that A109925(m) > 1.
LINKS
EXAMPLE
4 is a term since 4 = 2^0 + 3 = 2^1 + 2 which is 2 ways.
6 is a term since 6 = 2^0 + 5 = 2^2 + 2.
PROG
(PARI) isok(m) = sum(k=0, logint(m, 2), isprime(m-2^k)) > 1; \\ Michel Marcus, Nov 10 2023
(Python)
from itertools import count, islice
from sympy import isprime
def A367186_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
c = 0
for i in range(n.bit_length()-1, -1, -1):
if isprime(n-(1<<i)):
c+=1
if c>1:
yield n
break
A367186_list = list(islice(A367186_gen(), 30)) # Chai Wah Wu, Nov 29 2023
CROSSREFS
Subsequence of A118955.
Sequence in context: A186497 A193627 A256792 * A345665 A343177 A085817
KEYWORD
nonn
AUTHOR
Yuda Chen, Nov 08 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 12:16 EDT 2024. Contains 373173 sequences. (Running on oeis4.)