|
|
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
|
|
|
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..]
(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.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|