A382887 Numbers k such that (k*2^d + 1)*(d*2^k + 1) is semiprime for some divisor d of k.
1, 2, 8, 12, 30, 51, 63, 141, 201, 209, 534, 4713, 5795, 6611, 7050, 18496, 24105, 32292, 32469, 52782, 59656, 80190, 90825
Offset: 1
Examples
12 is in this sequence because (12*2^3 + 1)*(3*2^12 + 1) = 97*12289 is semiprime for divisor 3 of 12.
Programs
-
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];
-
PARI
isok(k) = fordiv(k, d, if (ispseudoprime(k*2^d+1) && ispseudoprime(d*2^k+1), return(1))); \\ Michel Marcus, Apr 16 2025
-
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<
A382887_list = list(islice(A382887_gen(),10)) # Chai Wah Wu, Apr 15 2025
Extensions
a(10) inserted and a(15)-a(23) from Michael S. Branicky, Apr 08 2025
Comments