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.

A073487 Squarefree numbers having exactly one prime gap.

Original entry on oeis.org

10, 14, 21, 22, 26, 33, 34, 38, 39, 42, 46, 51, 55, 57, 58, 62, 65, 66, 69, 70, 74, 78, 82, 85, 86, 87, 91, 93, 94, 95, 102, 106, 111, 114, 115, 118, 119, 122, 123, 129, 133, 134, 138, 141, 142, 145, 146, 154, 155, 158, 159, 161, 165, 166, 174, 177, 178, 183, 185
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Comments

A073484(a(n)) = 1.

Examples

			78 is a term, as 78 = 2*3*13 with one gap between 3 and 13.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Res:= NULL:
    for a from 1 to numtheory:-pi(isqrt(N)) do
      for b from a do
        p:= mul(ithprime(i),i=a..b);
        if p > N/ithprime(b+2) then break fi;
        for c from b+2 while p*ithprime(c) <= N do
          for d from c do
            q:= mul(ithprime(i),i=c..d);
            if p*q > N then break fi;
            Res:= Res, p*q;
          od
        od
      od
    od:
    sort([Res]); # Robert Israel, Apr 20 2017
  • Mathematica
    okQ[n_] := SquareFreeQ[n] && Length[SequencePosition[FactorInteger[n][[All, 1]], {p_?PrimeQ, q_?PrimeQ} /; q != NextPrime[p]]] == 1;
    Select[Range[200], okQ] (* Jean-François Alcover, Feb 28 2019 *)