This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A180018 #11 Nov 06 2022 07:48:47 %S A180018 0,0,1,1,3,3,4,4,7,7,-1,-1,1,1,2,2,6,6,7,7,0,0,1,1,4,4,5,5,7,7,-1,-1, %T A180018 4,4,5,5,7,7,8,8,2,2,3,3,5,5,6,6,10,10,2,2,4,4,5,5,8,8,9,9,2,2,3,3,9, %U A180018 9,10,10,12,12,4,4,7,7,8,8,10,10,11,11,6,6,7,7,9,9,10,10,13,13,5,5,7,7,8,8 %N A180018 Difference of sums of digits of n in decimal and in binary representation. %H A180018 Reinhard Zumkeller, <a href="/A180018/b180018.txt">Table of n, a(n) for n = 0..10000</a> %H A180018 <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a> %F A180018 a(n) = A007953(n) - A000120(n); %F A180018 a(A037308(n)) = 0; %F A180018 a(A011557(n)) = 1 - A000120(A011557(n)); %F A180018 a(A000079(n)) = A007953(A000079(n)) - 1; %F A180018 a(A002283(n)) = A008591(n) - A000120(A002283(n)); %F A180018 a(A000225(n)) = A007953(A000225(n)) - n. %t A180018 Table[Total[IntegerDigits[n]]-Total[IntegerDigits[n,2]],{n,0,100}] (* _Harvey P. Dale_, Dec 27 2015 *) %o A180018 (PARI) a(n) = sumdigits(n) - hammingweight(n); \\ _Michel Marcus_, Nov 06 2022 %Y A180018 Cf. A180017, A180019, A007088. %Y A180018 Cf. A007953, A000120, A037308, A011557. %Y A180018 Cf. A000079, A002283, A008591, A000225. %K A180018 base,sign %O A180018 0,5 %A A180018 _Reinhard Zumkeller_, Aug 06 2010