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!)
A228495 Characteristic function of the odd odious numbers (A092246). 5

%I #32 Aug 06 2023 03:06:51

%S 0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,

%T 0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,

%U 0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0

%N Characteristic function of the odd odious numbers (A092246).

%C The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - _Jeremy Gardiner_, Dec 28 2008.

%C a(n+1) is the characteristic function of the even evil numbers (A125592). - _Jeremy Gardiner_, Feb 06 2015

%H Antti Karttunen, <a href="/A228495/b228495.txt">Table of n, a(n) for n = 0..65537</a>

%H Tanya Khovanova, <a href="http://arxiv.org/abs/1410.2193">There are no coincidences</a>, arXiv preprint 1410.2193 [math.CO], 2014.

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.

%F a(2n) = 0, a(2n+1) = A092436(n).

%F a(n) = A000035(n) * A010060(n). - _Antti Karttunen_, Jan 12 2019

%t a[n_] := If[OddQ[n] && OddQ[DigitCount[n, 2, 1]], 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 06 2023 *)

%o (PARI) a(n)=if(n%2==0,0,subst(Pol(binary((n-1)/2)),x,1)%2==0)

%o (PARI) A228495(n) = ((n%2)&&(hammingweight(n)%2)); \\ _Antti Karttunen_, Jan 12 2019

%o (Python)

%o def A228495(n): return n.bit_count()&1&n # _Chai Wah Wu_, Mar 03 2023

%Y Cf. A000035, A010060, A092246, A092436, A125592, A254379.

%Y Cf. A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975.

%K nonn,base

%O 0,1

%A _Ralf Stephan_, Aug 23 2013

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 March 28 16:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)