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.

A137794 Characteristic function of numbers having no prime gaps in their factorization.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 11 2008

Keywords

Crossrefs

Cf. A137721 (partial sums).

Programs

  • Mathematica
    a[n_] := With[{pp = PrimePi @ FactorInteger[n][[All, 1]]},
         Boole[pp[[-1]] - pp[[1]] + 1 == Length[pp]]];
    Array[a, 105] (* Jean-François Alcover, Dec 09 2021 *)
  • PARI
    A137794(n) = if(1>=omega(n),1,my(pis=apply(primepi,factor(n)[,1])); for(k=2,#pis,if(pis[k]>(1+pis[k-1]),return(0))); (1)); \\ Antti Karttunen, Sep 27 2018

Formula

a(n) = 0^A073490(n).
a(A073491(n)) = 1; a(A073492(n)) = 0;
a(n) = A137721(n) - A137721(n-1) for n>1.