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”).

A364252
a(n) = 1 if n has no other prime factors than 2 and/or Mersenne primes, otherwise 0.
3
1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1
OFFSET
1
FORMULA
Fully multiplicative with a(p^e) = [p==2] + A036987(p), where [ ] is the Iverson bracket.
a(n) = [A336467(n) == 1].
a(n) >= A336923(n) >= A364251(n).
PROG
(PARI)
A209229(n) = (n && !bitand(n, n-1));
A364252(n) = { my(f=factor(n)); prod(k=1, #f~, (2==f[k, 1] || A209229(f[k, 1]+1))); };
CROSSREFS
Characteristic function of A219174.
Sequence in context: A257196 A176137 A290808 * A190239 A120529 A292301
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jul 16 2023
STATUS
approved