|
|
A227190
|
|
a(n) = n minus (product of run lengths in binary representation of n)
|
|
9
|
|
|
0, 1, 1, 2, 4, 4, 4, 5, 7, 9, 9, 8, 11, 11, 11, 12, 14, 16, 15, 18, 20, 20, 20, 18, 21, 24, 23, 22, 26, 26, 26, 27, 29, 31, 29, 32, 35, 34, 33, 37, 39, 41, 41, 40, 43, 43, 43, 40, 43, 46, 43, 48, 51, 50, 49, 47, 51, 55, 53, 52, 57, 57, 57, 58, 60, 62, 59, 62
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
FORMULA
|
|
|
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|