login
Numbers k such that k-4 and k+4 are prime and gcd(k, sigma(k)) is prime.
0

%I #39 May 11 2026 23:38:55

%S 15,33,105,177,195,267,273,393,405,483,573,705,747,825,915,933,987,

%T 1017,1065,1113,1167,1233,1293,1323,1455,1527,1563,1605,1617,1827,

%U 2157,2247,2337,2343,2463,2535,2553,2703,2715,2745,2883,2913,2967,3015,3255,3327,3453,3495,3537,3543

%N Numbers k such that k-4 and k+4 are prime and gcd(k, sigma(k)) is prime.

%C k is the midpoint of a prime pair (k-4, k+4) differing by 8; this sequence is a subsequence of A087680.

%C All terms are divisible by 3. Since k-4 and k+4 are odd primes greater than 3, they must be congruent to 5 and 1 mod 6, respectively; hence all terms are congruent to 3 mod 6.

%C Most computed terms satisfy gcd(k, sigma(k)) = 3, though other prime values such as 7 and 13 also occur.

%e For k = 15: 15-4 = 11 and 15+4 = 19 are prime. Also, sigma(15) = 24 and gcd(15, 24) = 3, which is prime, so 15 is a term.

%e For k = 9: 9-4 = 5 and 9+4 = 13 are prime, but sigma(9) = 13 and gcd(9, 13) = 1, which is not prime, so 9 is not a term.

%t Select[Range[3600], And @@ PrimeQ[{# - 4, # + 4, GCD[#, DivisorSigma[1, #]]}] &] (* _Amiram Eldar_, May 08 2026 *)

%o (Python)

%o from sympy import divisor_sigma, gcd, isprime

%o def ok(k): return isprime(k-4) and isprime(k+4) and isprime(gcd(k, divisor_sigma(k)))

%o print([k for k in range(1, 4000) if ok(k)])

%Y Intersection of A087680 and A392199.

%Y Cf. A394757, A395258.

%K nonn

%O 1,1

%A _Aied Sulaiman_, May 08 2026