login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = A073138(n) - n.
3

%I #16 Sep 26 2018 03:11:25

%S 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,

%T 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,

%U 0,0,0,31,30,45,28,43,42,49,24,39,38,45,36,43,42,45,16

%N a(n) = A073138(n) - n.

%H Seiichi Manyama, <a href="/A319650/b319650.txt">Table of n, a(n) for n = 0..8191</a>

%o (Ruby)

%o def A(k, n)

%o (0..n).map{|i| i.to_s(k).split('').sort.reverse.join.to_i(k) - i}

%o end

%o p A(2, 100)

%o (PARI) a(n) = fromdigits(vecsort(binary(n),,4), 2) - n; \\ _Michel Marcus_, Sep 25 2018

%Y Cf. A073138, A164884.

%K nonn,base,look

%O 0,10

%A _Seiichi Manyama_, Sep 25 2018