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!)
A254651 Characteristic function of A254614, numbers that are either odd or evil (or both). 3
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, 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, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0
COMMENTS
A254614 is the complement of A128309 (even odious numbers).
A254379 is the characteristic function of A128309.
LINKS
FORMULA
a(n) = 1-A254379(n).
EXAMPLE
A254614 begins 0,1,3,5, hence this sequence begins 1,1,0,1,0,1.
MATHEMATICA
a[n_] := If[OddQ[n] || !OddQ[DigitCount[n, 2, 1]], 1, 0]; Array[a, 100, 0] (* Amiram Eldar, Aug 07 2023 *)
PROG
(PARI) A254651(n) = bitor((n%2), !(hammingweight(n)%2)); \\ Antti Karttunen, Oct 01 2018
(Python)
def A254651(n): return (n&1^1)&n.bit_count()^1 # Chai Wah Wu, Mar 09 2023
CROSSREFS
Cf. A128309, A254377, A254379, A254614, A254655 (run lengths).
Sequence in context: A065251 A039982 A267349 * A267579 A285414 A131372
KEYWORD
nonn,base
AUTHOR
Jeremy Gardiner, Feb 04 2015
EXTENSIONS
Name amended by Antti Karttunen, Oct 01 2018
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 16 11:48 EDT 2024. Contains 371711 sequences. (Running on oeis4.)