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.
%I A319652 #18 Aug 07 2024 15:40:49 %S A319652 0,1,2,3,1,5,6,7,2,6,10,11,3,7,11,15,1,5,6,7,5,21,22,23,6,22,26,27,7, %T A319652 23,27,31,2,6,10,11,6,22,26,27,10,26,42,43,11,27,43,47,3,7,11,15,7,23, %U A319652 27,31,11,27,43,47,15,31,47,63,1,5,6,7,5,21,22,23,6,22,26,27 %N A319652 Write n in 4-ary, sort digits into increasing order. %H A319652 Seiichi Manyama, <a href="/A319652/b319652.txt">Table of n, a(n) for n = 0..4095</a> %p A319652 a:= n-> (l-> add(l[-i]*4^(i-1), i=1..nops(l)))(sort(convert(n, base, 4))): %p A319652 seq(a(n), n=0..75); # _Alois P. Heinz_, Aug 07 2024 %t A319652 Table[FromDigits[Sort[IntegerDigits[n, 4]], 4], {n, 0, 100}] (* _Paolo Xausa_, Aug 07 2024 *) %o A319652 (Ruby) %o A319652 def A(k, n) %o A319652 (0..n).map{|i| i.to_s(k).split('').sort.join.to_i(k)} %o A319652 end %o A319652 p A(4, 100) %o A319652 (PARI) a(n) = fromdigits(vecsort(digits(n, 4)), 4); \\ _Michel Marcus_, Sep 25 2018 %Y A319652 b-ary: A038573 (b=2), A038574 (b=3), this sequence (b=4), A319653 (b=5), A319654 (b=6), A319655 (b=7), A319656 (b=8), A319657 (b=9), A004185 (b=10). %Y A319652 Cf. A165012. %K A319652 nonn,base %O A319652 0,3 %A A319652 _Seiichi Manyama_, Sep 25 2018