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!)
A321226 Describe the binary representation of n in binary and convert back to decimal. 2
2, 3, 14, 5, 28, 59, 22, 7, 30, 115, 238, 117, 44, 91, 30, 9, 56, 123, 462, 229, 476, 955, 470, 119, 46, 179, 366, 181, 60, 123, 38, 11, 58, 227, 494, 245, 924, 1851, 918, 231, 478, 1907, 3822, 1909, 940, 1883, 478, 233, 88, 187, 718, 357, 732, 1467, 726, 183 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
This sequence is a binary variant of the "Look and Say" sequence A045918.
There is only one fixed point: a(7) = 7.
LINKS
FORMULA
a(2^n - 1) = 2*n + 1 for any n > 0.
a(4*n + 1) = 4*a(2*n) + 3 for any n > 0.
a(4*n + 2) = 4*a(2*n + 1) + 2 for any n >= 0.
a(A020330(2*n)) = A020330(a(2*n)) for any n > 0.
a(A049190(n)) = A049190(n+1) for any n > 0.
EXAMPLE
For n = 67:
- the binary representation of 67 is "1000011",
- we see, in binary: "1" "1", "100" "0", "10" "1",
- hence the binary representation of a(67) is "111000101",
- and a(67) = 453 in decimal.
PROG
(PARI) a(n, b=2) = if (n==0, return (b)); my (d=digits(b*n, b), v=0, w=0); d[#d] = -1; for (i=1, #d-1, w++; if (d[i]!=d[i+1], v = b*(v*b^#digits(w, b) + w) + d[i]; w = 0)); v
CROSSREFS
Sequence in context: A249826 A352407 A364037 * A337329 A329365 A119616
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 10 2018
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 August 21 10:31 EDT 2024. Contains 375345 sequences. (Running on oeis4.)