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.

A073493 Numbers having exactly one prime gap in their factorization.

This page as a plain text file.
%I A073493 #14 Oct 15 2021 11:27:05
%S A073493 10,14,20,21,22,26,28,33,34,38,39,40,42,44,46,50,51,52,55,56,57,58,62,
%T A073493 63,65,66,68,69,70,74,76,78,80,82,84,85,86,87,88,91,92,93,94,95,98,99,
%U A073493 100,102,104,106,111,112,114,115,116,117,118,119,122,123,124,126,129
%N A073493 Numbers having exactly one prime gap in their factorization.
%H A073493 Reinhard Zumkeller, <a href="/A073493/b073493.txt">Table of n, a(n) for n = 1..10000</a>
%F A073493 A073490(a(n)) = 1.
%e A073493 200 is a term, as 200 = 2*2*2*5*5 with one gap between 2 and 5.
%t A073493 pa[n_, k_] := If[k == NextPrime[n], 0, 1]; Select[Range[130], Total[pa @@@ Partition[First /@ FactorInteger[#], 2, 1]] == 1 &] (* _Jayanta Basu_, Jul 01 2013 *)
%o A073493 (Haskell)
%o A073493 a073493 n = a073493_list !! (n-1)
%o A073493 a073493_list = filter ((== 1) . a073490) [1..]
%o A073493 -- _Reinhard Zumkeller_, Dec 20 2013
%o A073493 (Python)
%o A073493 from sympy import primefactors, nextprime
%o A073493 def ok(n):
%o A073493     pf = primefactors(n)
%o A073493     return sum(p2 != nextprime(p1) for p1, p2 in zip(pf[:-1], pf[1:])) == 1
%o A073493 print(list(filter(ok, range(1, 130)))) # _Michael S. Branicky_, Oct 14 2021
%Y A073493 Cf. A005117, A073490, A073492, A073494, A073495, A073487.
%K A073493 nonn
%O A073493 1,1
%A A073493 _Reinhard Zumkeller_, Aug 03 2002