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!)
A281313 Write n in Elias's delta code, interchange the 1's and 0's and convert it back to decimal. 2
0, 7, 6, 11, 10, 9, 8, 63, 62, 61, 60, 59, 58, 57, 56, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
For n = 10, the Elias delta code for 10 is '11000010' and after interchanging the 0's and 1's it becomes '00111101'. Now, 111101_2 = 61_10. So, a(10) = 61.
PROG
(Python)
def a(n):
....s=""
....for i in A281150(n):
........if i=="1":
............s+="0"
........else:
............s+="1"
....return int(s, 2)
CROSSREFS
Cf. A035327, A054429 (n is converted to Elias gamma code, the 1's and 0's are interchanged and the code is converted back to decimal, for n>1), A281150.
Sequence in context: A197588 A021569 A085964 * A082121 A309622 A215338
KEYWORD
nonn,base
AUTHOR
Indranil Ghosh, Jan 19 2017
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 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)