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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - Jeremy Gardiner, Dec 28 2008.
a(n+1) is the characteristic function of the even evil numbers (A125592). - Jeremy Gardiner, Feb 06 2015
LINKS
Tanya Khovanova, There are no coincidences, arXiv preprint 1410.2193 [math.CO], 2014.
FORMULA
a(2n) = 0, a(2n+1) = A092436(n).
a(n) = A000035(n) * A010060(n). - Antti Karttunen, Jan 12 2019
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
Sequence in context: A300477 A355202 A353556 * A356982 A284683 A369968
KEYWORD
nonn,base
AUTHOR
Ralf Stephan, Aug 23 2013
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 July 18 13:57 EDT 2024. Contains 374378 sequences. (Running on oeis4.)