# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a319657 Showing 1-1 of 1 %I A319657 #19 Aug 07 2024 15:50:35 %S A319657 0,1,2,3,4,5,6,7,8,1,10,11,12,13,14,15,16,17,2,11,20,21,22,23,24,25, %T A319657 26,3,12,21,30,31,32,33,34,35,4,13,22,31,40,41,42,43,44,5,14,23,32,41, %U A319657 50,51,52,53,6,15,24,33,42,51,60,61,62,7,16,25,34,43,52,61,70,71 %N A319657 Write n in 9-ary, sort digits into increasing order. %H A319657 Seiichi Manyama, Table of n, a(n) for n = 0..6560 %p A319657 a:= n-> (l-> add(l[-i]*9^(i-1), i=1..nops(l)))(sort(convert(n, base, 9))): %p A319657 seq(a(n), n=0..71); # _Alois P. Heinz_, Aug 07 2024 %t A319657 Table[FromDigits[Sort[IntegerDigits[n, 9]], 9], {n, 0, 100}] (* _Paolo Xausa_, Aug 07 2024 *) %o A319657 (Ruby) %o A319657 def A(k, n) %o A319657 (0..n).map{|i| i.to_s(k).split('').sort.join.to_i(k)} %o A319657 end %o A319657 p A(9, 100) %o A319657 (PARI) a(n) = fromdigits(vecsort(digits(n, 9)), 9); \\ _Michel Marcus_, Sep 25 2018 %Y A319657 b-ary: A038573 (b=2), A038574 (b=3), A319652 (b=4), A319653 (b=5), A319654 (b=6), A319655 (b=7), A319656 (b=8), this sequence (b=9), A004185 (b=10). %Y A319657 Cf. A165110. %K A319657 nonn,base,look %O A319657 0,3 %A A319657 _Seiichi Manyama_, Sep 25 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE