OFFSET
1
COMMENTS
More exactly: characteristic function of squarefree numbers with no gaps in their prime factorization. - Antti Karttunen, Dec 15 2017
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
Array[Boole[Or[# == 1, PrimeQ[#], Union@ Differences@ PrimePi@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger[#] ] == {1} ] ] &, 105] (* Michael De Vlieger, Dec 16 2017 *)
PROG
(Haskell)
a192280 n = fromEnum $ a053590 n == n
a192280_list = map a192280 [1..]
-- Reinhard Zumkeller, May 28 2012, Aug 26 2011
(PARI) A192280(n) = { if(1==n, return(1)); if(!issquarefree(n), return(0)); my(ps=factor(n)[, 1], pis=vector(length(ps), i, primepi(ps[i])), diffsminusones = vector(length(pis)-1, i, (pis[i+1]-pis[i])-1)); !vecsum(diffsminusones); }; \\ Antti Karttunen, Dec 15 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 26 2011
STATUS
approved