login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A356172
a(n) = 1 if n is odd and not divisible by two consecutive prime numbers, otherwise 0.
5
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
OFFSET
1
COMMENTS
a(n) = 1 if n is odd and relatively prime to A003961(n), otherwise 0.
a(n) = 1 if n and the smallest positive k such that n divides k*A003961(k) are coprime, otherwise 0.
FORMULA
a(n) = A000035(n) * A356173(n).
a(n) = [gcd(n, A356164(n)) == 1], where [ ] is the Iverson bracket.
a(n) = [A356166(n) == 1] = [A356169(n) == 0].
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A356172(n) = ((n%2)&&(1==gcd(n, A003961(n))));
(PARI)
\\ Alternatively (slow!):
A356172(n) = for(k=1, oo, if((k*A003961(k))%n==0, return(1==gcd(n, k))));
CROSSREFS
Characteristic function of A356171.
Sequence in context: A014485 A014373 A014317 * A015813 A015901 A016077
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 28 2022
STATUS
approved