The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A192280 Characteristic function of numbers that are the product of consecutive primes. 9
1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
COMMENTS
More exactly: characteristic function of squarefree numbers with no gaps in their prime factorization. - Antti Karttunen, Dec 15 2017
LINKS
FORMULA
a(A073485(n)) = 1, a(A193166(n)) = 0.
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
Characteristic function of A073485.
Sequence in context: A361897 A189206 A323152 * A342005 A354355 A266974
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 26 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 00:16 EDT 2024. Contains 372549 sequences. (Running on oeis4.)