The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A371459 For any positive integer with binary digits (b_1, ..., b_w) (where b_1 = 1), the binary digits of a(n), possibly with leading zeros, are (b_2, b_4, ..., b_{floor(w/2) * 2}); a(0) = 0. 2
0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 2, 3, 2, 3, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 4, 5, 4, 5, 6, 7, 6, 7, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 0, 0, 1, 1, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,13
COMMENTS
In other words, we keep even-indexed bits.
Every integer appears infinitely many times in the sequence.
LINKS
FORMULA
a(n) = 0 iff n belongs to A126684.
a(A000695(n)) = 0.
a(A001196(n)) = n.
EXAMPLE
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 0 1 0
2 0 10 0
3 1 11 1
4 0 100 0
5 0 101 0
6 1 110 1
7 1 111 1
8 0 1000 0
9 1 1001 1
10 0 1010 0
11 1 1011 1
12 2 1100 10
13 3 1101 11
14 2 1110 10
15 3 1111 11
16 0 10000 0
MATHEMATICA
A371459[n_] := FromDigits[IntegerDigits[n, 2][[2;; -1;; 2]], 2];
Array[A371459, 100, 0] (* Paolo Xausa, Mar 28 2024 *)
PROG
(PARI) a(n) = { my (b = binary(n)); fromdigits(vector(#b\2, k, b[2*k]), 2); }
(Python)
def A371459(n): return int(bin(n)[3::2], 2) if n>1 else 0 # Chai Wah Wu, Mar 27 2024
CROSSREFS
See A371442 for the sequence related to odd-indexed bits.
See A059906 and A063695 for similar sequences.
Sequence in context: A105436 A266911 A244075 * A354522 A059905 A295301
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Mar 24 2024
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 May 16 10:52 EDT 2024. Contains 372552 sequences. (Running on oeis4.)