%I #14 Sep 08 2022 08:46:12
%S 0,1,2,3,4,5,6,7,8,9,10,20,12,30,13,23,40,14,24,34,50,15,25,35,45,60,
%T 16,26,36,46,56,70,17,27,37,47,57,67,80,18,28,38,48,58,68,78,90,19,29,
%U 39,49,59,69,79,89,102,103,203,123,104,204,124,304,134,234
%N a(n) = the smallest number k such that A227362(k) = A009995(n).
%C A227362(n) = reverse concatenation of distinct digits of n in base 10, A009995(n) = possible values of A227362(m) in increasing order.
%C Finite sequence with 1023 terms.
%H Jaroslav Krizek, <a href="/A257128/b257128.txt">Table of n, a(n) for n = 1..1023 (complete list)</a>
%e a(15) = 13 because 13 is the smallest number k such that reverse concatenation of distinct digits of k (i.e., 31) in base 10 = A227362(k) = A227362(13) = A009995(15) = 31.
%t f[n_] := Block[{s = Sort@ Flatten@ Table[FromDigits /@ Subsets[Range[9, 0, -1], {j}], {j, 10}], i, k}, Reap@For[i = 1, i <= n, i++, k = 0; While[FromDigits[Reverse@ Union@ IntegerDigits@ k] != s[[i]], k++]; Sow@ k] // Flatten // Rest]; f@ 65 (* _Michael De Vlieger_, Apr 16 2015, after _Zak Seidov_ at A009995, corrected by _Robert G. Wilson v_ *)
%o (Magma) A257128:=func<n | exists(r){k: k in [1..100000] | Seqint(Setseq(Set(Sort(&cat[Intseq(k)])))) eq n} select r else 0>; [A257128(n): n in[A009995(n)]]
%Y Cf. A000027, A009995, A227362.
%K nonn,base,fini,full
%O 1,3
%A _Jaroslav Krizek_, Apr 16 2015