OFFSET
0,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..4095
MAPLE
a:= n-> (l-> add(l[-i]*4^(i-1), i=1..nops(l)))(sort(convert(n, base, 4))):
seq(a(n), n=0..75); # Alois P. Heinz, Aug 07 2024
MATHEMATICA
Table[FromDigits[Sort[IntegerDigits[n, 4]], 4], {n, 0, 100}] (* Paolo Xausa, Aug 07 2024 *)
PROG
(Ruby)
def A(k, n)
(0..n).map{|i| i.to_s(k).split('').sort.join.to_i(k)}
end
p A(4, 100)
(PARI) a(n) = fromdigits(vecsort(digits(n, 4)), 4); \\ Michel Marcus, Sep 25 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seiichi Manyama, Sep 25 2018
STATUS
approved