OFFSET
0,7
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8192
Helmut Prodinger and Friedrich J. Urbanek, Infinite 0-1-Sequences Without Long Adjacent Identical Blocks, Discrete Mathematics, Volume 28, Number 3, 1979, pages 277-289. Also first author's copy. See theorem 3.6, n_1(k) = a(k).
FORMULA
MATHEMATICA
a[n_] := (n - Length@ Split[IntegerDigits[n, 2]])/2; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 16 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 14 2015
STATUS
approved