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.

A330478 Semiprimes A001358(k) = p*q such that p*q+p+q and r*s+r+s are consecutive primes, where A001358(k+1)=r*s.

Original entry on oeis.org

33, 1718, 4174, 7971, 8434, 11114, 13011, 14005, 16645, 17571, 29787, 30574, 43647, 58414, 63177, 65006, 69694, 71794, 87218, 95314, 97827, 104485, 125738, 126394, 150334, 193594, 196341, 198694, 200378, 201094, 212631, 212847, 227554, 239314, 243591, 254427, 276085, 277594, 288818, 291514
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 15 2019

Keywords

Examples

			a(3)=4174=2*2087, the next semiprime is 4178=2*2089, and 4174+2+2087=6263 and 4178+2+2089=6269 are consecutive primes.
		

Crossrefs

Cf. A001358.

Programs

  • Maple
    g:= proc(n) local F;
      F:= ifactors(n)[2];
      if nops(F)=2 then n+F[1][1]+F[2][1] else n+2*F[1][1] fi
    end proc:
    SP:= select(t -> numtheory:-bigomega(t)=2, [seq(i,i=4..3*10^5)]):
    nSP:= nops(SP):
    P1:= map(g, SP):
    SP[select(t -> isprime(P1[t]) and nextprime(P1[t])=P1[t+1], [$1..nSP-1])];
  • Mathematica
    Select[Partition[Union@ Apply[Join, Table[Flatten@ {p #, Sort[{p, #}]} & /@ Prime@ Range@ PrimePi@ Floor[Max[#]/p], {p, #}]] &@ Prime@ Range[3*10^4], 2, 1], And[AllTrue[{#1, #2}, PrimeQ], #2 == NextPrime@ #1] & @@ {Total@ #1, Total@ #2} & @@ # &][[All, 1, 1]] (* Michael De Vlieger, Dec 15 2019 *)