login
A319723
Write n in 6-ary, sort digits into decreasing order.
10
0, 1, 2, 3, 4, 5, 6, 7, 13, 19, 25, 31, 12, 13, 14, 20, 26, 32, 18, 19, 20, 21, 27, 33, 24, 25, 26, 27, 28, 34, 30, 31, 32, 33, 34, 35, 36, 42, 78, 114, 150, 186, 42, 43, 79, 115, 151, 187, 78, 79, 85, 121, 157, 193, 114, 115, 121, 127, 163, 199, 150, 151, 157, 163
OFFSET
0,3
LINKS
FORMULA
n <= a(n) < 6n. - Charles R Greathouse IV, Aug 07 2024
MATHEMATICA
Table[FromDigits[ReverseSort[IntegerDigits[n, 6]], 6], {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(6, 100)
(PARI) a(n) = fromdigits(vecsort(digits(n, 6), , 4), 6); \\ Michel Marcus, Sep 26 2018
CROSSREFS
b-ary: A073138 (b=2), A319651 (b=3), A319720 (b=4), A319722 (b=5), this sequence (b=6), A319724 (b=7), A319725 (b=8), A319726 (b=9), A004186 (b=10).
Sequence in context: A265124 A032990 A060810 * A271377 A363331 A363334
KEYWORD
nonn,base,easy
AUTHOR
Seiichi Manyama, Sep 26 2018
STATUS
approved