OFFSET
1,1
EXAMPLE
a(n): 2 11 47 139 157
np 3 13 53 149 163
[1 0] [1 0 1 1] [1 0 1 1 1 1] [1 0 0 0 1 0 1 1] [1 0 0 1 1 1 0 1]
[1 1] [1 1 0 1] [1 1 0 1 0 1] [1 0 0 1 0 1 0 1] [1 0 1 0 0 0 1 1]
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
n: 1 2 3 4 5
PROG
(Python)
from sympy import nextprime
def A374179(n):
p, pb = 2, 2
while (q:=nextprime(p)):
if pb==(qb:=q.bit_length()) and (p^q).bit_count() == n:
return p
p, pb = q, qb # Chai Wah Wu, Jul 10 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hugo Pfoertner, Jul 09 2024
STATUS
approved