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 A321804 #8 Nov 24 2018 01:26:37 %S A321804 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,22, %T A321804 -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,33,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,44,-1, %U A321804 -1,-1,-1,-1,-1,-1,-1,-1,-1,55,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,66,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,77,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,88,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,99,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,111,11,11,11,11,11,11,11,11,-1,-1,22,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,33,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,44,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,55,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,66,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,77,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,88,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,99 %N A321804 Keep only consecutive identical decimal digits of n; write -1 if all digits disappear. %C A321804 Consecutive identical digits of n are kept. Leading zeros are erased unless the result is 0. If all digits are erased, we write -1 for the result (A321803 is another version, which uses 0 for the empty string). %C A321804 More than the usual number of terms are shown in order to reach some interesting examples. Agrees with A321800 for n < 121. %e A321804 123321 becomes 33, 1123 becomes 11, 112331 becomes 1133, and 100223 becomes 22 (as we don't accept leading zeros). Note that 12321 disappears immediately and we get -1. %t A321804 Array[If[# == {}, -1, FromDigits@ #] &@ Apply[Join, Select[Split@ IntegerDigits[#], Length@ # > 1 &]] &, 200] (* _Michael De Vlieger_, Nov 23 2018 *) %o A321804 (Python) %o A321804 from re import split %o A321804 def A321804(n): %o A321804 return (lambda x: int(x) if x != '' else -1)(''.join(d if len(d) != 1 else '' for d in split('(0+)|(1+)|(2+)|(3+)|(4+)|(5+)|(6+)|(7+)|(8+)|(9+)',str(n)) if d != '' and d != None)) %Y A321804 Cf. A320486, A321800, A321797, A321800, A321803. %K A321804 sign,base %O A321804 0,12 %A A321804 _Chai Wah Wu_, Nov 19 2018