OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..4096
FORMULA
a(n) = n - A167489(n).
EXAMPLE
For 8, "1000" in binary, the run lengths are 1 and 3, 1*3=3, and 8-3 = 5, thus a(8)=5. For 24, "11000" in binary, the run lengths are 2 and 3, 2*3=6, and 24-6 = 18, thus a(24)=18.
MATHEMATICA
Table[n-Times@@(Length/@Split[IntegerDigits[n, 2]]), {n, 70}] (* Harvey P. Dale, Aug 02 2013 *)
PROG
(Scheme): (define (A227190 n) (- n (A167489 n))) ;; The Scheme-program for A167489 is found under that entry.
(Haskell)
a227190 n = n - a167489 n -- Reinhard Zumkeller, Jul 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 04 2013
STATUS
approved