This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A381792 #14 Mar 10 2025 11:01:24 %S A381792 4,6,18,24,34,72,96,98,116,130,150,172,200,206,270,290,350,356,362, %T A381792 386,410,420,450,504,508,554,576,618,666,682,720,738,754,782,784,808, %U A381792 820,832,858,892,960,962,984,1016,1050,1102,1110,1154,1162,1168,1176,1184,1206,1256,1284,1296,1302,1360 %N A381792 Numbers k such that k + prime(k) is prime and k + semiprime(k) is semiprime. %C A381792 All terms are even. %H A381792 Robert Israel, <a href="/A381792/b381792.txt">Table of n, a(n) for n = 1..10000</a> %F A381792 A001222(a(n) + A000040(a(n))) = 1 and A001222(a(n) + A001358(a(n))) = 2. %e A381792 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. %p A381792 N:= 100: # for a(1) .. a(N) %p A381792 with(priqueue): %p A381792 initialize(pq); %p A381792 insert([-4,2,2],pq); %p A381792 p:= 1: %p A381792 R:= NULL: count:= 0: %p A381792 for n from 1 while count < N do %p A381792 p:= nextprime(p); %p A381792 t:= extract(pq); %p A381792 if n::even and isprime(n + p) and numtheory:-bigomega(n - t[1])=2 then R:= R, n; count:= count+1 fi; %p A381792 q:= nextprime(t[3]); %p A381792 if t[2] = t[3] then insert([-q^2,q,q],pq) fi; %p A381792 insert([-t[2]*q,t[2],q],pq); %p A381792 od: %p A381792 R; %t A381792 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 *) %Y A381792 Intersection of A064402 and A100915. %Y A381792 Cf. A000040, A001222, A001358, %K A381792 nonn %O A381792 1,1 %A A381792 _Zak Seidov_ and _Robert Israel_, Mar 07 2025