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!)
A102391 Evil numbers in evil places. 4
0, 0, 0, 3, 0, 5, 6, 0, 0, 9, 10, 0, 12, 0, 0, 15, 0, 17, 18, 0, 20, 0, 0, 23, 24, 0, 0, 27, 0, 29, 30, 0, 0, 33, 34, 0, 36, 0, 0, 39, 40, 0, 0, 43, 0, 45, 46, 0, 48, 0, 0, 51, 0, 53, 54, 0, 0, 57, 58, 0, 60, 0, 0, 63, 0, 65, 66, 0, 68, 0, 0, 71, 72, 0, 0, 75, 0, 77, 78, 0, 80, 0, 0, 83, 0, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
Evil numbers A001969(n) appear at positions indexed by the evil numbers, 0 otherwise. A001477(n) = A102391(n) + A102392(n).
LINKS
FORMULA
a(n) = if((1+floor(n/2)) (1+(-1)^A000120(n))/2 = 0, 0, n).
a(n) = if((1+floor(n/2)) (1+(-1)^A010060(n))/2 = 0, 0, n).
MATHEMATICA
a[n_] := If[EvenQ @ DigitCount[n, 2, 1], n, 0]; Array[a, 100, 0] (* Amiram Eldar, Aug 02 2020 *)
PROG
(Python)
def A102391(n): return 0 if n.bit_count()&1 else n # Chai Wah Wu, Nov 23 2023
CROSSREFS
Sequence in context: A351692 A181840 A198432 * A038556 A342303 A193508
KEYWORD
easy,nonn,base
AUTHOR
Paul Barry, Jan 06 2005
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 24 05:58 EDT 2024. Contains 374575 sequences. (Running on oeis4.)