cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A228495 Characteristic function of the odd odious numbers (A092246).

This page as a plain text file.
%I A228495 #32 Aug 06 2023 03:06:51
%S A228495 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 A228495 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 A228495 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 A228495 Characteristic function of the odd odious numbers (A092246).
%C A228495 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 A228495 a(n+1) is the characteristic function of the even evil numbers (A125592). - _Jeremy Gardiner_, Feb 06 2015
%H A228495 Antti Karttunen, <a href="/A228495/b228495.txt">Table of n, a(n) for n = 0..65537</a>
%H A228495 Tanya Khovanova, <a href="http://arxiv.org/abs/1410.2193">There are no coincidences</a>, arXiv preprint 1410.2193 [math.CO], 2014.
%H A228495 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%H A228495 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.
%F A228495 a(2n) = 0, a(2n+1) = A092436(n).
%F A228495 a(n) = A000035(n) * A010060(n). - _Antti Karttunen_, Jan 12 2019
%t A228495 a[n_] := If[OddQ[n] && OddQ[DigitCount[n, 2, 1]], 1, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Aug 06 2023 *)
%o A228495 (PARI) a(n)=if(n%2==0,0,subst(Pol(binary((n-1)/2)),x,1)%2==0)
%o A228495 (PARI) A228495(n) = ((n%2)&&(hammingweight(n)%2)); \\ _Antti Karttunen_, Jan 12 2019
%o A228495 (Python)
%o A228495 def A228495(n): return n.bit_count()&1&n # _Chai Wah Wu_, Mar 03 2023
%Y A228495 Cf. A000035, A010060, A092246, A092436, A125592, A254379.
%Y A228495 Cf. A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975.
%K A228495 nonn,base
%O A228495 0,1
%A A228495 _Ralf Stephan_, Aug 23 2013