Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Sep 25 2018 02:30:03
%S 0,1,2,2,4,5,5,4,8,9,10,10,10,12,11,8,16,17,18,18,20,21,21,20,20,23,
%T 25,24,22,26,23,16,32,33,34,34,36,37,37,36,40,41,42,42,42,44,43,40,40,
%U 45,48,46,50,52,51,48,44,51,55,52,46,54,47,32,64,65,66,66,68,69,69,68,72,73,74,74,74,76,75,72,80,81,82,82,84,85,85,84,84,87,89,88,86,90,87,80,80
%N a(n) = n - A318921(n).
%C How much n decreases by when its binary runs are all shortened by one bit.
%H Rémy Sigrist, <a href="/A319409/b319409.txt">Table of n, a(n) for n = 0..16384</a>
%F a(n) = n iff n is a Fibbinary number (A003714). - _Rémy Sigrist_, Sep 25 2018
%o (PARI) a(n) = my (p=-1, d=0, b=1, r=n); while (r, my (l=r%2); if (p!=l, p=l, d+=l*b; b*=2); r\=2); n-d \\ _Rémy Sigrist_, Sep 25 2018
%Y Cf. A003714, A175046, A318921, A319407.
%K nonn,base
%O 0,3
%A _N. J. A. Sloane_, Sep 19 2018