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.

A381792 Numbers k such that k + prime(k) is prime and k + semiprime(k) is semiprime.

Original entry on oeis.org

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

Views

Author

Zak Seidov and Robert Israel, Mar 07 2025

Keywords

Comments

All terms are even.

Examples

			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.
		

Crossrefs

Intersection of A064402 and A100915.

Programs

  • 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 *)

Formula

A001222(a(n) + A000040(a(n))) = 1 and A001222(a(n) + A001358(a(n))) = 2.