Nothing Special   »   [go: up one dir, main page]

login
A047843
Describe n: give frequency of each digit, by increasing size; mention also missing digits between the smallest and largest one.
3
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1011, 21, 1112, 110213, 11020314, 1102030415, 110203040516, 11020304050617, 1102030405060718, 110203040506070819, 100112, 1112, 22, 1213, 120314, 12030415, 1203040516
OFFSET
0,1
COMMENTS
Other methods to describe or summarize n are: A047842 (as here, but ignoring "missing" digits), A244112 (count digits in order of decreasing size, ignoring missing digits). - M. F. Hasler, Feb 25 2018
LINKS
EXAMPLE
131 contains two 1's, zero 2's and one 3, so a(131) = 210213.
MATHEMATICA
a[n_] := Module[{T, f}, T = Tally[IntegerDigits[n]]; f[_] = 0; Do[f[t[[1]]] = t[[2]], {t, T}]; Table[{f[k], k}, {k, Min@T[[All, 1]], Max@T[[All, 1]]} ] // Flatten // FromDigits];
a /@ Range[0, 26] (* Jean-François Alcover, Jan 07 2020 *)
PROG
(PARI) A047843(n, S="")={if(n, for(d=vecmin(n=digits(n)), vecmax(n), S=Str(S, #select(t->t==d, n), d)); eval(S), 10)} \\ M. F. Hasler, Feb 25 2018
CROSSREFS
KEYWORD
nonn,easy,base,nice
EXTENSIONS
More accurate title from M. F. Hasler, Feb 25 2018
STATUS
approved