login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A254377 Characteristic function of A230709: a(n) = 1 if n is either evil (A001969) or even odious (A128309), otherwise 0 (when n is odd odious). 3
1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
A228495 is the characteristic function of the odd odious numbers (A092246).
A230709 is the union of even odious (A128309) and evil (A001969) numbers.
This sequence equals the parity of A003071, A093431, A122248, and A175186 (allowing for offsets).
Run lengths are given by A254378.
LINKS
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
FORMULA
a(n) = 1-A228495(n).
MATHEMATICA
a[n_] := If[!OddQ[n] || !OddQ[DigitCount[n, 2, 1]], 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Aug 06 2023 *)
PROG
(PARI) A254377(n) = !((n%2)&&(hammingweight(n)%2)); \\ Antti Karttunen, Sep 27 2019
(Python)
def A254377(n): return n.bit_count()&1&n^1 # Chai Wah Wu, Mar 09 2023
CROSSREFS
Sequence in context: A267358 A368281 A153860 * A285657 A162519 A181359
KEYWORD
nonn,base
AUTHOR
Jeremy Gardiner, Jan 29 2015
EXTENSIONS
Secondary part of name added by Antti Karttunen, Sep 27 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)