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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

6, 10, 10, 14, 14, 21, 35, 22, 22, 26, 26, 33, 35, 34, 34, 38, 38, 46, 77, 46, 46, 58, 55, 57, 65, 58, 58, 62, 62, 69, 77, 74, 87, 74, 74, 82, 95, 82, 82, 86, 86, 93, 95, 94, 94, 106, 115, 106, 119, 106, 106, 118, 115, 118, 119, 118, 118, 122, 122, 129, 143, 133, 141, 134
Offset: 1

Views

Author

Rick L. Shepherd, Jan 02 2007

Keywords

Crossrefs

Programs

  • Maple
    N:= 500: # for terms before the first term > N
    P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
    SP:= select(`<=`,{seq(seq(P[i]*P[j],i=1..j),j=1..nops(P))},N):
    R:= NULL:
    for n from 1 do
      Q:= SP intersect (SP +~ (2*n));
      if Q = {} then break fi;
      R:= R, min(Q)
    od:
    R; # Robert Israel, Jan 30 2025
  • Mathematica
    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 *)

A241656 Smallest semiprime, sp, such that 2n - sp is a semiprime, or a(n)=0 if there is no such sp.

Original entry on oeis.org

0, 0, 0, 4, 4, 6, 4, 6, 4, 6, 0, 9, 4, 6, 4, 6, 9, 10, 4, 6, 4, 6, 21, 9, 4, 6, 15, 10, 9, 9, 4, 6, 4, 6, 15, 10, 9, 14, 4, 6, 25, 10, 4, 6, 4, 6, 9, 9, 4, 6, 9, 9, 15, 14, 4, 6, 21, 10, 25, 9, 4, 6, 4, 6, 9, 9, 15, 14, 4, 6, 9, 10, 4, 6, 4, 6, 9, 10, 15, 14, 4, 6, 21, 9, 4, 6, 15, 10, 9, 14
Offset: 1

Views

Author

Keywords

Comments

Conjecture: every even number greater than 22 is a sum of two semiprimes. Only 2, 4, 6 & 22 cannot be so represented.
If n is prime, then a(n) must be either 4 or an odd semiprime. See A241535.
First occurrence of the k-th semiprime (A001358): 4, 6, 12, 18, 38, 27, 23, 124, 41, 326, 127, 1344, 147, 1278, 189, 3294, 757, 317, 1362, 1775, 3300, 2504, 2025, 7394, 84848, 13899, 56584, 11347, 156396, 7667, 7905, 15447, 404898, 20937, ..., .

Examples

			a(12) = 9 because 2*12 = 24 = 9 + 15, two semiprimes.
		

Crossrefs

Programs

  • Mathematica
    NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[ sgn < 0, sp--, sp++]]; If[ sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; f[n_] := Block[{en = 2 n, sp = 4}, While[ PrimeOmega[en - sp] != 2, sp = NextSemiPrime[sp]]; If[en > sp, sp, 0]]; Array[ f, 90]
Showing 1-2 of 2 results.