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!)
A056966 In binary: write what is described (putting a leading zero on numbers which have an odd number of binary digits). 2
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 2, 2, 4, 5, 3, 3, 6, 7, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,15
LINKS
EXAMPLE
a(54)=2 because 54 = 110110 base 2, which can be read as one 1 followed by zero 1's followed by one 0, i.e., 10 base 2 = 2 base 10.
PROG
(Python)
def A056966(n):
s = bin(n)[2:]
s = '0'*(len(s)&1)+s
return int('0'+''.join(s[i+1]*int(s[i])for i in range(0, len(s), 2)), 2) # Chai Wah Wu, Feb 12 2023
CROSSREFS
Sequence in context: A194016 A292256 A095750 * A362363 A037846 A037882
KEYWORD
nonn,base
AUTHOR
Henry Bottomley, Jul 20 2000
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 April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)