OFFSET
1,1
COMMENTS
a(n) in binary is either an alternating string of 11's and 00's, or exactly one of the 00's is replaced by 000 (see A319423). - Chai Wah Wu, Oct 04 2018
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10099
Chai Wah Wu, Record values in appending and prepending bitstrings to runs of binary digits, arXiv:1810.02293 [math.NT], 2018
MATHEMATICA
b[n_] := (Append[#, #[[1]]]& /@ Split[IntegerDigits[n, 2]]) // Flatten // FromDigits[#, 2]&;
Reap[For[rec = 0; k = 1, k < 3000, k++, bk = b[k]; If[bk > rec, rec = bk; Sow[rec]]]][[2, 1]] (* Jean-François Alcover, Nov 12 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 23 2018
STATUS
approved