login
A353518
a(n) = 1 if n is a product of superprimorials (A006939), otherwise 0.
2
1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
FORMULA
For all n >= 1, a(n) <= A322585(n) <= A341629(n).
PROG
(PARI)
firstdiffs0forward(vec) = { my(v=vector(#vec)); for(n=1, #v, v[n] = vec[n]-if(#v==n, 0, vec[1+n])); (v); };
A353518(n) = if(1==n, 1, my(f=factor(n), len=#f~); if(primepi(f[len, 1])!=len, return(0), my(diffs=firstdiffs0forward(f[, 2])); for(i=1, #diffs-1, if(diffs[i+1]>diffs[i], return(0))); (1)));
CROSSREFS
Characteristic function of A181818.
Sequence in context: A354193 A354188 A342025 * A353687 A354918 A354108
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 28 2022
STATUS
approved