%I #11 Sep 25 2023 08:18:47
%S 51,130,260,520,1040,3120,21440,42880,85760,171520,343040,686080,
%T 1372160,2744320,5488640,10977280,21954560,43909120,87818240,
%U 175636480,351272960,702545920,1405091840,2810183680,5620367360,11240734720,22481469440,44962938880,89925877760,179851755520,359703511040
%N a(n) is the first number k with n prime divisors such that, if m is the next number with n prime divisors, k + m and k - m also have n prime divisors. In each case the divisors are counted with multiplicity.
%C The offset is 2 because it is impossible for the sum and difference of primes to both be prime.
%H Robert Israel, <a href="/A365834/b365834.txt">Table of n, a(n) for n = 2..1000</a>
%F a(n) = 2^(n-2) * 5 * 67 for all n >= 8, the next number with n prime divisors being 2^(n-2) * 3 * 113.
%F Proof:
%F k, m, k + m and m - k all have n prime divisors iff 2*k, 2*m, 2*k + 2*m and 2*m - 2*k all have n+1 prime divisor. 2*m is the next number after 2*k with n+1 prime divisors iff m is the next number after k with n prime divisors and between 2*k and 2*m there are no odd numbers with n+1 prime divisors. But the smallest odd number with n+1 prime divisors is 3^(n+1), and 3^(n+1) > 2^(n-1) * 3 * 113 for n >= 10. To complete the proof, we verify computationally the claim for n = 8, 9 and 10.
%e a(3) = 130 because 130 = 2 * 5 * 13 is a triprime, the next triprime is 138 = 2 * 3 * 23, and 130 + 138 = 268 = 2^2 * 67 and 138 - 130 = 8 are triprimes, and this is the first triprime that works.
%p with(priqueue);
%p f:= proc(n) local M,a,b,v,q,w;
%p M:= 10^1000:
%p a:= 2^n:
%p initialize(Aprimes);
%p insert([-2^n,0,2],Aprimes);
%p do
%p v:= extract(Aprimes);
%p if v[2] = n then
%p b:= -v[1];
%p if numtheory:-bigomega(b-a) = n and numtheory:-bigomega(b+a)= n then return a
%p fi;
%p a:= b;
%p else
%p insert(v+[0,1,0],Aprimes);
%p q:= nextprime(v[3]);
%p w:= v[1]*(q/v[3])^(n-v[2]);
%p if w >= -M then insert([w,v[2],q],Aprimes) fi
%p fi
%p od:
%p end proc:
%p map(f, [$2..60]);
%Y Cf. A001222, A365833.
%K nonn
%O 2,1
%A _Zak Seidov_ and _Robert Israel_, Sep 19 2023