Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A356421
Positive integers k such that k + p is a power of 2, where p is the least prime greater than k.
0
3, 15, 61, 255, 2043, 4093, 32765, 65535, 262141, 8388599, 33554397, 134217699, 268435453, 1073741821, 17179869159, 137438953463, 274877906937, 1099511627761, 8796093022179, 17592186044409, 70368744177649, 140737488355323, 281474976710635, 562949953421243
OFFSET
1,1
COMMENTS
The corresponding sequence of primes is the intersection of A014210 and A356434 without the initial 2.
EXAMPLE
3 + 5 = 8;
15 + 17 = 32;
61 + 67 = 128.
PROG
(Python)
from itertools import islice
from sympy import nextprime
def A356421_gen():
m = 1
while True:
n = m+1<<1
k = m
p = nextprime(k)
while k+p>n:
k -=1
p = nextprime(k)
if k+p==n:
yield k
m = n-1
A356421_list = list(islice(A356421_gen(), 30)) # Chai Wah Wu, Sep 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ali Sada, Aug 06 2022
EXTENSIONS
Terms from Tom Duff via Seqfan.
STATUS
approved