login
A365861
a(1) = 4; for n > 1, a(n) is the first semiprime k not yet listed such that |k - a(n-1)| and k + a(n-1) are also semiprimes.
1
4, 10, 25, 21, 166, 51, 26, 65, 69, 118, 85, 34, 111, 115, 46, 95, 38, 77, 142, 93, 226, 9, 86, 35, 14, 129, 74, 49, 106, 15, 6, 209, 94, 39, 326, 91, 87, 122, 143, 58, 33, 82, 121, 146, 55, 22, 133, 158, 183, 298, 155, 62, 185, 134, 119, 262, 57, 178, 123, 218, 253, 249, 334, 201, 422, 169, 202
OFFSET
1,1
COMMENTS
Conjecture: this is a permutation of A001358.
LINKS
EXAMPLE
a(3) = 25 because 25 = 5^2 is a semiprime, |a(2) - 25| = 15 = 3 * 5 and a(2) + 25 = 35 = 5 * 7 are semiprimes, and 25 is the first semiprime not already in the sequence for which this works.
MAPLE
R:= 4: a:= 4: S:= select(t -> numtheory:-bigomega(t)=2, [$6..1000]): found:= true:
for n from 2 to 100 while found do
found:= false;
for j from 1 to nops(S) do
b:=S[j];
if numtheory:-bigomega(abs(b-a)) = 2 and numtheory:-bigomega(a+b) = 2 then
R:= R, b; a:= b; found:= true; S:= subsop(j=NULL, S);
break
fi
od od:
R;
MATHEMATICA
s={m=4}; Do[n=6; While[MemberQ[s, n]|| {2, 2, 2} != PrimeOmega[{n, n-m, n+m}], n++];
AppendTo[s, m=n], {50}]
CROSSREFS
Cf. A001358.
Sequence in context: A223014 A038783 A127070 * A107961 A051864 A111153
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Sep 20 2023
STATUS
approved