login
A319725
Write n in 8-ary, sort digits into decreasing order.
8
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 25, 33, 41, 49, 57, 16, 17, 18, 26, 34, 42, 50, 58, 24, 25, 26, 27, 35, 43, 51, 59, 32, 33, 34, 35, 36, 44, 52, 60, 40, 41, 42, 43, 44, 45, 53, 61, 48, 49, 50, 51, 52, 53, 54, 62, 56, 57, 58, 59, 60, 61, 62, 63, 64, 72, 136, 200, 264
OFFSET
0,3
LINKS
FORMULA
n <= a(n) < 8n. - Charles R Greathouse IV, Aug 07 2024
MATHEMATICA
Table[FromDigits[ReverseSort[IntegerDigits[n, 8]], 8], {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(8, 100)
(PARI) a(n) = fromdigits(vecsort(digits(n, 8), , 4), 8); \\ Michel Marcus, Sep 26 2018
CROSSREFS
b-ary: A073138 (b=2), A319651 (b=3), A319720 (b=4), A319722 (b=5), A319723 (b=6), A319724 (b=7), this sequence (b=8), A319726 (b=9), A004186 (b=10).
Sequence in context: A304245 A304244 A335493 * A048408 A199343 A118765
KEYWORD
nonn,base,look,easy
AUTHOR
Seiichi Manyama, Sep 26 2018
STATUS
approved