login
A381792
Numbers k such that k + prime(k) is prime and k + semiprime(k) is semiprime.
1
4, 6, 18, 24, 34, 72, 96, 98, 116, 130, 150, 172, 200, 206, 270, 290, 350, 356, 362, 386, 410, 420, 450, 504, 508, 554, 576, 618, 666, 682, 720, 738, 754, 782, 784, 808, 820, 832, 858, 892, 960, 962, 984, 1016, 1050, 1102, 1110, 1154, 1162, 1168, 1176, 1184, 1206, 1256, 1284, 1296, 1302, 1360
OFFSET
1,1
COMMENTS
All terms are even.
LINKS
FORMULA
A001222(a(n) + A000040(a(n))) = 1 and A001222(a(n) + A001358(a(n))) = 2.
EXAMPLE
a(3) = 18 is a term because the 18-th prime and 18-th semiprime are 61 and 51 respectively, 18 + 61 = 79 is prime and 18 + 51 = 69 = 3 * 23 is semiprime.
MAPLE
N:= 100: # for a(1) .. a(N)
with(priqueue):
initialize(pq);
insert([-4, 2, 2], pq);
p:= 1:
R:= NULL: count:= 0:
for n from 1 while count < N do
p:= nextprime(p);
t:= extract(pq);
if n::even and isprime(n + p) and numtheory:-bigomega(n - t[1])=2 then R:= R, n; count:= count+1 fi;
q:= nextprime(t[3]);
if t[2] = t[3] then insert([-q^2, q, q], pq) fi;
insert([-t[2]*q, t[2], q], pq);
od:
R;
MATHEMATICA
lim=1360; i=1; Do[Until[PrimeOmega[i]==2, i++]; Sp[n]=i, {n, lim}]; Select[Range[lim], PrimeQ[#+Prime[#]]&&PrimeOmega[#+Sp[#]]==2&] (* James C. McMahon, Mar 09 2025 *)
CROSSREFS
Intersection of A064402 and A100915.
Sequence in context: A109310 A219190 A337617 * A120391 A064217 A026623
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Mar 07 2025
STATUS
approved