OFFSET
0
COMMENTS
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
KEYWORD
nonn,base
AUTHOR
Jeremy Gardiner, Feb 04 2015
EXTENSIONS
Name amended by Antti Karttunen, Oct 01 2018
STATUS
approved