%I #23 Mar 01 2020 04:23:16
%S 9,9,9,9,9,9,9,9,9,9,8,18,8,8,8,8,8,8,8,8,8,8,18,8,8,8,8,8,8,8,8,8,8,
%T 18,8,8,8,8,8,8,8,8,8,8,18,8,8,8,8,8,8,8,8,8,8,18,8,8,8,8,8,8,8,8,8,8,
%U 18,8,8,8,8,8,8,8,8,8,8,18,8,8,8,8,8,8,8,8,8,8,18,8,8,8,8,8,8,8,8,8,8,18,17
%N The 10-block imbalance of n (see Comments for definition).
%C In a certain country, digits come in sealed boxes containing 10 distinct digits each. To write the number 2019 you can open a single box and extract the digits 2, 0, 1, and 9.
%C We call the "imbalance" of 2019 the number of unused digit in the opened box(es). So writing 2019 leaves an imbalance of 6 (the 6 unused digits in the box).
%C If we want to write 2020 we must open two boxes - and leave behind 8 digits in the first box and 8 digits in the second one. This produces for 2020 an imbalance of 16.
%H Scott R. Shannon, <a href="/A332550/b332550.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Angelini, <a href="http://cinquantesignes.blogspot.com/2020/02/integer-imbalance.html">Integer + imbalance</a>, Feb 20 2020.
%e 10 has an imbalance of 8 - there are two unused digits in the box. For 11 we have to open two boxes to get the two 1's, leaving an imbalance of 9+9 = 18.
%t Array[10*Max@ #2[[All, -1]] - Length@ #1 & @@ {#, Tally@ #} &@ IntegerDigits@ # &, 101, 0] (* _Michael De Vlieger_, Feb 21 2020 *)
%Y Cf. A332551.
%K nonn,base
%O 0,1
%A _N. J. A. Sloane_, Feb 21 2020, based on a message from _Eric Angelini_, Feb 20 2020
|