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.

This page as a plain text file.
%I A073487 #10 Feb 28 2019 18:55:31
%S A073487 10,14,21,22,26,33,34,38,39,42,46,51,55,57,58,62,65,66,69,70,74,78,82,
%T A073487 85,86,87,91,93,94,95,102,106,111,114,115,118,119,122,123,129,133,134,
%U A073487 138,141,142,145,146,154,155,158,159,161,165,166,174,177,178,183,185
%N A073487 Squarefree numbers having exactly one prime gap.
%C A073487 A073484(a(n)) = 1.
%H A073487 Robert Israel, <a href="/A073487/b073487.txt">Table of n, a(n) for n = 1..10000</a>
%e A073487 78 is a term, as 78 = 2*3*13 with one gap between 3 and 13.
%p A073487 N:= 1000: # to get all terms <= N
%p A073487 Res:= NULL:
%p A073487 for a from 1 to numtheory:-pi(isqrt(N)) do
%p A073487   for b from a do
%p A073487     p:= mul(ithprime(i),i=a..b);
%p A073487     if p > N/ithprime(b+2) then break fi;
%p A073487     for c from b+2 while p*ithprime(c) <= N do
%p A073487       for d from c do
%p A073487         q:= mul(ithprime(i),i=c..d);
%p A073487         if p*q > N then break fi;
%p A073487         Res:= Res, p*q;
%p A073487       od
%p A073487     od
%p A073487   od
%p A073487 od:
%p A073487 sort([Res]); # _Robert Israel_, Apr 20 2017
%t A073487 okQ[n_] := SquareFreeQ[n] && Length[SequencePosition[FactorInteger[n][[All, 1]], {p_?PrimeQ, q_?PrimeQ} /; q != NextPrime[p]]] == 1;
%t A073487 Select[Range[200], okQ] (* _Jean-François Alcover_, Feb 28 2019 *)
%Y A073487 Cf. A005117, A073486, A073488, A073489, A073493.
%K A073487 nonn
%O A073487 1,1
%A A073487 _Reinhard Zumkeller_, Aug 03 2002