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.
%I A137794 #13 Dec 09 2021 11:54:33 %S A137794 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, %T A137794 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, %U A137794 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 %N A137794 Characteristic function of numbers having no prime gaps in their factorization. %H A137794 Antti Karttunen, <a href="/A137794/b137794.txt">Table of n, a(n) for n = 1..65537</a> %H A137794 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %F A137794 a(n) = 0^A073490(n). %F A137794 a(A073491(n)) = 1; a(A073492(n)) = 0; %F A137794 a(n) = A137721(n) - A137721(n-1) for n>1. %t A137794 a[n_] := With[{pp = PrimePi @ FactorInteger[n][[All, 1]]}, %t A137794 Boole[pp[[-1]] - pp[[1]] + 1 == Length[pp]]]; %t A137794 Array[a, 105] (* _Jean-François Alcover_, Dec 09 2021 *) %o A137794 (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 %Y A137794 Cf. A137721 (partial sums). %K A137794 nonn %O A137794 1,1 %A A137794 _Reinhard Zumkeller_, Feb 11 2008