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 A351653 #28 Aug 21 2025 09:59:26 %S A351653 1,1,1,1,1,1,1,1,1,1,11,2,11,11,11,11,11,11,11,11,11,11,2,11,11,11,11, %T A351653 11,11,11,11,11,11,2,11,11,11,11,11,11,11,11,11,11,2,11,11,11,11,11, %U A351653 11,11,11,11,11,2,11,11,11,11,11,11,11,11,11,11,2,11,11 %N A351653 a(n) is the concatenation of the length of each run of digits in the decimal representation of n. %e A351653 a(100) = 12, because the 1st run (1) has length 1 and the 2nd run (00) has length 2. %e A351653 a(13211) = 1112, because the 1st run (1) has length 1, the 2nd run (3) has length 1, the 3rd run (2) has length 1 and the 4th run (11) has length 2. %t A351653 a[n_] := FromDigits[IntegerDigits[Length /@ Split[IntegerDigits[n]]] // Flatten]; Array[a, 100, 0] (* _Amiram Eldar_, Feb 16 2022 *) %o A351653 (PARI) a(n) = {my(result = "", count = 0, dig = digits(n), last = dig[1]); for(i = 1, length(dig), current = dig[i]; if (current == last, count++, result = concat(result, Str(count)); count = 1); last = current); result = concat(result, Str(count)); return(eval(result))}; %o A351653 (PARI) apply( {A351653(n,d=digits(n+!n))=d=concat([0,[k|k<-[1..#n=d[^1]-d[^-1]], n[k]], #d]); fromdigits(d[^1]-d[^-1])}, [0..77]) \\ _M. F. Hasler_, Aug 21 2025 %o A351653 (Python) %o A351653 from itertools import groupby %o A351653 def A351653(n): return int(''.join(str(len(list(g))) for k, g in groupby(str(n)))) # _Chai Wah Wu_, Mar 11 2022 %Y A351653 Cf. A001462, A318921, A318927 (binary version). %K A351653 base,easy,nonn %O A351653 0,11 %A A351653 _Eder Vanzei_, Feb 16 2022