OFFSET
0,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65537
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
FORMULA
a(2n) = 0, a(2n+1) = A092436(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) a(n)=if(n%2==0, 0, subst(Pol(binary((n-1)/2)), x, 1)%2==0)
(PARI) A228495(n) = ((n%2)&&(hammingweight(n)%2)); \\ Antti Karttunen, Jan 12 2019
(Python)
def A228495(n): return n.bit_count()&1&n # Chai Wah Wu, Mar 03 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ralf Stephan, Aug 23 2013
STATUS
approved