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!)
A255070 (1/2)*(n minus number of runs in the binary expansion of n): a(n) = (n - A005811(n)) / 2 = A236840(n)/2. 7
0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 4, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 9, 10, 11, 11, 11, 12, 13, 13, 14, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 19, 20, 20, 21, 22, 23, 23, 23, 24, 24, 24, 25, 26, 27, 27, 27, 28, 29, 29, 30, 31, 31, 31, 31, 32, 32, 32, 33, 34, 34, 34, 34, 35 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
LINKS
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
a(n) = A236840(n) / 2 = (n - A005811(n)) / 2.
Other identities:
a(A091067(n)) = n for all n >= 1.
a(A255068(n)) = n for all n >= 0.
a(A269363(n)) = A269367(n). - Antti Karttunen, Aug 12 2019
MATHEMATICA
a[n_] := (n - Length@ Split[IntegerDigits[n, 2]])/2; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 16 2023 *)
PROG
(Scheme) (define (A255070 n) (/ (A236840 n) 2))
CROSSREFS
Least inverse: A091067 (also the positions of records).
Greatest inverse: A255068.
Run lengths: A106836.
Sequence in context: A055768 A349909 A064952 * A176001 A194272 A285764
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 14 2015
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 25 10:47 EDT 2024. Contains 371967 sequences. (Running on oeis4.)