A047843 Describe n: give frequency of each digit, by increasing size; mention also missing digits between the smallest and largest one.
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
Examples
131 contains two 1's, zero 2's and one 3, so a(131) = 210213.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..5000
Programs
-
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 *)
-
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
Extensions
More accurate title from M. F. Hasler, Feb 25 2018
Comments