login
A296210
Characteristic function for A104210: a(n) = 1 if n is divisible by at least 2 consecutive primes, 0 otherwise.
5
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1
OFFSET
1
MATHEMATICA
Array[Boole@ MemberQ[Differences@ PrimePi@ FactorInteger[#][[All, 1]], 1] &, 105] (* Michael De Vlieger, Dec 16 2017 *)
PROG
(PARI) A296210(n) = { if(1==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)); !factorback(diffsminusones); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 15 2017
STATUS
approved