

A320263


Write n in binary, then modify each run of 0's and each run of 1's by prepending a 0. a(n) is the decimal equivalent of the result.


2



1, 4, 3, 8, 17, 12, 7, 16, 33, 68, 35, 24, 49, 28, 15, 32, 65, 132, 67, 136, 273, 140, 71, 48, 97, 196, 99, 56, 113, 60, 31, 64, 129, 260, 131, 264, 529, 268, 135, 272, 545, 1092, 547, 280, 561, 284, 143, 96, 193, 388, 195, 392, 785, 396, 199, 112, 225, 452, 227
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

A variation of A175046. Indices of record values are given by A319423.


LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000
Chai Wah Wu, Record values in appending and prepending bitstrings to runs of binary digits, arXiv:1810.02293 [math.NT], 2018.


FORMULA

a(n) = A320262(n)/2.


EXAMPLE

6 in binary is 110. Modify each run by prepending a 0 to get 01100, which is 12 in decimal. So a(6) = 12.


PROG

(Python)
from re import split
def A320263(n):
return int(''.join('0'+d for d in split('(0+)(1+)', bin(n)[2:]) if d != '' and d != None), 2)


CROSSREFS

Cf. A175046, A319423, A320037, A320038, A320039, A320261, A320262.
Sequence in context: A196132 A198179 A137503 * A215330 A108624 A108623
Adjacent sequences: A320260 A320261 A320262 * A320264 A320265 A320266


KEYWORD

nonn,base


AUTHOR

Chai Wah Wu, Oct 08 2018


STATUS

approved



