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.

A243428 Semiprimes A001358(n) such that A001358(n) + 2^n is also a semiprime.

Original entry on oeis.org

4, 6, 10, 14, 22, 25, 35, 39, 95, 123, 129, 177, 289, 309, 327, 355, 415, 445, 471, 497, 543, 689
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 05 2014

Keywords

Comments

Generated by n = 1, 2, 4, 5, 8, 9, 13, 15, 34, 42, 43, 57, 90, 99, 105, 112, 131, 136, 145, 153, 170, 184, ...

Examples

			4 is in this sequence because A001358(1) + 2^1 = 6 is also semiprime.
		

Crossrefs

Cf. A001358.

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]]; SemiPrimePi[n_] := Sum[ PrimePi[ n/Prime[i]] - i + 1, {i, PrimePi[ Sqrt[ n]] }]; sp = 4; lst = {}; While[ sp < 1001, If[ PrimeOmega[sp + 2^SemiPrimePi@ sp] == 2, AppendTo[lst, sp]; Print@ sp]; sp = NextSemiPrime@ sp; c++]; lst (* Robert G. Wilson v, Jun 20 2014 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    sp=list(700); s=[]; for(n=1, #sp, if(bigomega(sp[n]+2^n)==2, s=concat(s, sp[n]))); s \\ Colin Barker, Jun 05 2014

Extensions

One term inserted, and more terms from Colin Barker, Jun 05 2014