cp's OEIS Frontend

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.

A127019 a(n) is the least semiprime s such that s - 2*n is also a semiprime.

This page as a plain text file.
%I A127019 #12 Jan 31 2025 03:31:25
%S A127019 6,10,10,14,14,21,35,22,22,26,26,33,35,34,34,38,38,46,77,46,46,58,55,
%T A127019 57,65,58,58,62,62,69,77,74,87,74,74,82,95,82,82,86,86,93,95,94,94,
%U A127019 106,115,106,119,106,106,118,115,118,119,118,118,122,122,129,143,133,141,134
%N A127019 a(n) is the least semiprime s such that s - 2*n is also a semiprime.
%H A127019 Robert Israel, <a href="/A127019/b127019.txt">Table of n, a(n) for n = 1..10000</a>
%p A127019 N:= 500: # for terms before the first term > N
%p A127019 P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
%p A127019 SP:= select(`<=`,{seq(seq(P[i]*P[j],i=1..j),j=1..nops(P))},N):
%p A127019 R:= NULL:
%p A127019 for n from 1 do
%p A127019   Q:= SP intersect (SP +~ (2*n));
%p A127019   if Q = {} then break fi;
%p A127019   R:= R, min(Q)
%p A127019 od:
%p A127019 R; # _Robert Israel_, Jan 30 2025
%t A127019 sp=Select[Range[1000],PrimeOmega[#]==2&];seq={};Do[s=0;Until[t=sp[[s]]-2n;PrimeOmega[t]==2&&t>0,s++];AppendTo[seq,sp[[s]]],{n,64}];seq (* _James C. McMahon_, Dec 30 2024 *)
%Y A127019 Cf. A127018, A020484.
%K A127019 nonn
%O A127019 1,1
%A A127019 _Rick L. Shepherd_, Jan 02 2007