login
Numbers k such that sopf(k) and k-sopf(k) are prime, where sopf() is the sum of distinct prime factors.
3

%I #62 Mar 16 2026 15:44:06

%S 4,10,12,18,20,24,36,44,48,50,72,80,108,144,162,176,200,210,216,242,

%T 284,288,320,384,390,462,464,548,570,576,630,648,656,704,764,780,840,

%U 858,864,944,972,1050,1088,1110,1136,1290,1296,1302,1388,1428,1430,1458,1470,1536,1680,1722,1724,1728,1794,1830,1844,1890,2000

%N Numbers k such that sopf(k) and k-sopf(k) are prime, where sopf() is the sum of distinct prime factors.

%C k is always even. If k is odd then sopf(k) is either even which cannot be a prime, or sopf(k) is odd so k-sopf(k) has to be even.

%C omega(a(n)) is even for n >= 2 where omega is A001221. - _David A. Corneth_, Mar 10 2026

%H James C. McMahon, <a href="/A393096/b393096.txt">Table of n, a(n) for n = 1..10000</a>

%e For n=8, a(8) = 44, the distinct prime factors are 2 and 11, these sum to the prime number 13. When this is added to the prime number 31 it returns the original number of 44.

%p filter:= proc(n) local v;

%p v:= convert(NumberTheory:-PrimeFactors(n),`+`); isprime(v) and isprime(n-v)

%p end proc:

%p select(filter, [seq(i,i=2..3000,2)]); # _Robert Israel_, Mar 12 2026

%t sopf[k_]:=Total[First/@FactorInteger[k]];q[k_]:=PrimeQ[sopf[k]]&&PrimeQ[k-sopf[k]];Select[Range[2000],q] (* _James C. McMahon_, Mar 16 2026 *)

%o (Python)

%o from sympy import isprime, primefactors

%o def ok(n):return isprime(sum(primefactors(n))) and isprime(n-sum(primefactors(n)))

%o print(list(filter(ok, range(1,2000))))

%o (PARI) isok(k) = my(s=vecsum(factor(k)[,1])); isprime(s) && isprime(k-s); \\ _Michel Marcus_, Mar 09 2026

%Y Cf. A001221, A008472, A394061, A394062.

%K nonn

%O 1,1

%A _Guy Siviour_, Mar 09 2026