login
A319650
a(n) = A073138(n) - n.
3
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 2, 3, 0, 1, 0, 0, 0, 7, 6, 9, 4, 7, 6, 7, 0, 3, 2, 3, 0, 1, 0, 0, 0, 15, 14, 21, 12, 19, 18, 21, 8, 15, 14, 17, 12, 15, 14, 15, 0, 7, 6, 9, 4, 7, 6, 7, 0, 3, 2, 3, 0, 1, 0, 0, 0, 31, 30, 45, 28, 43, 42, 49, 24, 39, 38, 45, 36, 43, 42, 45, 16
OFFSET
0,10
LINKS
PROG
(Ruby)
def A(k, n)
(0..n).map{|i| i.to_s(k).split('').sort.reverse.join.to_i(k) - i}
end
p A(2, 100)
(PARI) a(n) = fromdigits(vecsort(binary(n), , 4), 2) - n; \\ Michel Marcus, Sep 25 2018
CROSSREFS
Sequence in context: A016458 A372345 A058513 * A285736 A325142 A047160
KEYWORD
nonn,base,look
AUTHOR
Seiichi Manyama, Sep 25 2018
STATUS
approved