A383475 Numbers k such that k*2^d is the average of a twin prime pair for some divisor d of k.
2, 3, 6, 9, 12, 15, 18, 21, 24, 30, 36, 39, 42, 45, 48, 51, 54, 60, 69, 72, 75, 78, 81, 90, 96, 99, 105, 108, 114, 120, 129, 132, 135, 141, 144, 150, 156, 165, 168, 174, 180, 186, 192, 201, 210, 216, 228, 231, 234, 240, 252, 258, 261, 264, 270, 282, 285, 288, 300
Offset: 1
Keywords
Examples
2 is a term in the sequence because 2*2^1 = 4 is the average of twin primes 3 and 5 for divisor d = 1 of k = 2.
Programs
-
Magma
[k: k in [1..300] | not #[d: d in Divisors(k) | IsPrime(k*2^d-1) and IsPrime(k*2^d+1)] eq 0];
-
Mathematica
q[k_] := AnyTrue[Divisors[k], And @@ PrimeQ[k * 2^# + {-1, 1}] &]; Select[Range[300], q] (* Amiram Eldar, Apr 28 2025 *)
-
PARI
isok(k) = fordiv(k, d, if (isprime(k*2^d-1) && isprime(k*2^d+1), return(1))); return(0); \\ Michel Marcus, Apr 28 2025