OFFSET
1,2
COMMENTS
a(24) > 10^5. - Michael S. Branicky, Apr 08 2025
EXAMPLE
12 is in this sequence because (12*2^3 + 1)*(3*2^12 + 1) = 97*12289 is semiprime for divisor 3 of 12.
PROG
(Magma) [n: n in [1..1000] | not #[d: d in Divisors(n) | IsPrime(d*2^n+1) and IsPrime(n*2^d+1)] eq 0];
(Python)
from itertools import count, islice
from sympy import isprime, divisors
def A382887_gen(): # generator of terms
yield from filter(lambda k:any(isprime((k<<d)+1) and isprime((d<<k)+1) for d in divisors(k, generator=True)), count(1))
(PARI) isok(k) = fordiv(k, d, if (ispseudoprime(k*2^d+1) && ispseudoprime(d*2^k+1), return(1))); \\ Michel Marcus, Apr 16 2025
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Apr 07 2025
EXTENSIONS
a(10) inserted and a(15)-a(23) from Michael S. Branicky, Apr 08 2025
STATUS
approved
