login
Lexicographically least increasing sequence of semiprimes a(n) such that a(n) - a(n-1) and a(n) + a(n-1) are also semiprimes.
5

%I #12 Apr 04 2023 19:48:32

%S 4,10,25,94,115,206,221,298,391,478,511,526,551,586,655,694,703,758,

%T 779,934,949,974,989,993,1126,1159,1418,1513,1522,1555,1594,1603,1658,

%U 1679,1718,1769,2018,2051,2066,2105,2174,2195,2234,2319,2462,2501,2578,2587,2846,2867,2906,2931,2986,3007

%N Lexicographically least increasing sequence of semiprimes a(n) such that a(n) - a(n-1) and a(n) + a(n-1) are also semiprimes.

%H Robert Israel, <a href="/A361611/b361611.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 25 because with a(2) = 10, 25, 25 - 10 = 15 and 25 + 10 = 35 are all semiprimes, and none of the semiprimes between 10 and 25 work.

%p R:= 4: count:= 0: x:= 4:

%p for i from 5 while count < 100 do

%p if andmap(t -> numtheory:-bigomega(t)=2, [i,i+x,i-x]) then

%p R:= R,i; x:= i; count:= count+1

%p fi

%p od:

%p R;

%t s = {m=4};Do[p = m + 4; While[{2, 2, 2} != PrimeOmega[{p, m + p, p -

%t m}], p++]; AppendTo[s, m = p], {100}]; s

%Y Cf. A001358.

%K nonn

%O 1,1

%A _Zak Seidov_ and _Robert Israel_, Mar 17 2023