cp's OEIS Frontend

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.

A348783 Let c(i) be the number of times the digit i appears in n, for 0 <= i <= 9; then a(n) is the concatenation of c(9) c(8) ... c(1) c(0), with leading 0's omitted.

This page as a plain text file.
%I A348783 #36 Nov 19 2021 07:34:17
%S A348783 1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000,11,
%T A348783 20,110,1010,10010,100010,1000010,10000010,100000010,1000000010,101,
%U A348783 110,200,1100,10100,100100,1000100,10000100,100000100,1000000100,1001,1010,1100,2000,11000
%N A348783 Let c(i) be the number of times the digit i appears in n, for 0 <= i <= 9; then a(n) is the concatenation of c(9) c(8) ... c(1) c(0), with leading 0's omitted.
%C A348783 "Leading zeros" means "zeros on the left".
%C A348783 21 -> 110 -> 21 is the first loop, when this operation is iterated. Another is 22 -> 200 -> 102 -> 111 -> 30 -> 1001 -> 22.
%C A348783 Suggested by an email from _Allan C. Wechsler_.
%C A348783 The numbers 2, 3, ..., 9 cannot appear, but 1 and all k >= 10 are terms. Specifically, if the decimal digits of k > 0 are d0^c, where d is a single nonzero digit and 0^c is a string of c > 0 concatenated 0's, then k appears as a(1^(d*10**(c-1))); otherwise, if the decimal digits of k are d0^cb where d and c are as before but c >= 0 and b is a string of digits not starting with 0, then k appears as a(1^(d*10^c) 0^b). - _Michael S. Branicky_, Nov 14 2021
%H A348783 Michael S. Branicky, <a href="/A348783/b348783.txt">Table of n, a(n) for n = 0..9999</a>
%e A348783 0 -> 1
%e A348783 1 -> 10
%e A348783 2 -> 100
%e A348783 3 -> 1000 (one 3, zero copies of 2, 1, 0, so 1 0 0 0)
%e A348783 4 -> 10000
%e A348783 5 -> 100000
%e A348783 6 -> 1000000
%e A348783 7 -> 10000000
%e A348783 8 -> 100000000
%e A348783 9 -> 1000000000
%e A348783 10 -> 11
%e A348783 11 -> 20
%e A348783 12 -> 110
%e A348783 ...
%e A348783 2222222222 -> 1000 (ten 2's, zero 1's, zero 0's, so 10 0 0)
%e A348783 ...
%t A348783 Array[FromDigits@*RotateLeft@*Reverse@*DigitCount,35,0] (* _Giorgos Kalogeropoulos_, Nov 15 2021 *)
%o A348783 (Python)
%o A348783 def a(n):
%o A348783     s = str(n)
%o A348783     return int("".join(str(s.count(d)) for d in "9876543210").lstrip("0"))
%o A348783 print([a(n) for n in range(35)]) # _Michael S. Branicky_, Nov 14 2021
%o A348783 (PARI) apply( {A348783(n)=if(n,eval(concat([Str(#[0|d<-n,d==i])|i<-+-[-vecmax(n=digits(n))..0]])),1)}, [0..66]) \\ _M. F. Hasler_, Nov 15 2021
%Y A348783 Cf. A100910, A348138.
%K A348783 nonn,base,look
%O A348783 0,2
%A A348783 _N. J. A. Sloane_, Nov 14 2021
%E A348783 More terms from _Michael S. Branicky_, Nov 14 2021