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!)
A344259 For any number n with binary expansion (b(1), ..., b(k)), the binary expansion of a(n) is (b(1), ..., b(ceiling(k/2))). 2
0, 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Leading zeros are ignored.
LINKS
FORMULA
a(A020330(n)) = n.
a(A006995(n+1)) = A162751(n).
a(n XOR A344220(n)) = a(n) (where XOR denotes the bitwise XOR operator).
EXAMPLE
The first terms, alongside their binary expansion, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 1 1 1
2 1 10 1
3 1 11 1
4 2 100 10
5 2 101 10
6 3 110 11
7 3 111 11
8 2 1000 10
9 2 1001 10
10 2 1010 10
11 2 1011 10
12 3 1100 11
13 3 1101 11
14 3 1110 11
15 3 1111 11
MATHEMATICA
Array[FromDigits[First@Partition[l=IntegerDigits[#, 2], Ceiling[Length@l/2]], 2]&, 100, 0] (* Giorgos Kalogeropoulos, May 14 2021 *)
PROG
(PARI) a(n) = n\2^(#binary(n)\2)
(Python)
def a(n): b = bin(n)[2:]; return int(b[:(len(b)+1)//2], 2)
print([a(n) for n in range(85)]) # Michael S. Branicky, May 14 2021
CROSSREFS
Sequence in context: A087175 A188817 A271099 * A165299 A071820 A055092
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, May 13 2021
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 13 23:15 EDT 2024. Contains 372524 sequences. (Running on oeis4.)