login
A319722
Write n in 5-ary, sort digits into decreasing order.
10
0, 1, 2, 3, 4, 5, 6, 11, 16, 21, 10, 11, 12, 17, 22, 15, 16, 17, 18, 23, 20, 21, 22, 23, 24, 25, 30, 55, 80, 105, 30, 31, 56, 81, 106, 55, 56, 61, 86, 111, 80, 81, 86, 91, 116, 105, 106, 111, 116, 121, 50, 55, 60, 85, 110, 55, 56, 61, 86, 111, 60, 61, 62, 87, 112, 85
OFFSET
0,3
LINKS
FORMULA
n <= a(n) < 5n. - Charles R Greathouse IV, Aug 07 2024
MATHEMATICA
Table[FromDigits[ReverseSort[IntegerDigits[n, 5]], 5], {n, 0, 100}] (* Paolo Xausa, Aug 07 2024 *)
PROG
(Ruby)
def A(k, n)
(0..n).map{|i| i.to_s(k).split('').sort.reverse.join.to_i(k)}
end
p A(5, 100)
(PARI) a(n) = fromdigits(vecsort(digits(n, 5), , 4), 5); \\ Michel Marcus, Sep 26 2018
CROSSREFS
b-ary: A073138 (b=2), A319651 (b=3), A319720 (b=4), this sequence (b=5), A319723 (b=6), A319724 (b=7), A319725 (b=8), A319726 (b=9), A004186 (b=10).
Sequence in context: A308776 A339556 A264995 * A060733 A283563 A033078
KEYWORD
nonn,base,easy
AUTHOR
Seiichi Manyama, Sep 26 2018
STATUS
approved