login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = A032742(n) AND n-A032742(n), where AND is bitwise-and (A004198) and A032742 = the largest proper divisor of n.
5

%I #7 Aug 28 2018 15:58:39

%S 0,1,0,2,0,3,0,4,2,5,0,6,0,7,0,8,0,9,0,10,6,11,0,12,4,13,0,14,0,15,0,

%T 16,2,17,4,18,0,19,8,20,0,21,0,22,14,23,0,24,2,25,0,26,0,27,8,28,2,29,

%U 0,30,0,31,0,32,4,33,0,34,6,35,0,36,0,37,16,38,2,39,0,40,18,41,0,42,0,43,24,44,0,45,12,46,30,47,0,48,0,49,0,50,0,51,0

%N a(n) = A032742(n) AND n-A032742(n), where AND is bitwise-and (A004198) and A032742 = the largest proper divisor of n.

%H Antti Karttunen, <a href="/A318518/b318518.txt">Table of n, a(n) for n = 1..65537</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = A004198(A032742(n), A060681(n)).

%F a(n) = n - A318516(n) = (n - A318517(n))/2.

%o (PARI)

%o A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));

%o A318518(n) = bitand(A032742(n),n-A032742(n));

%Y Cf. A004198, A032742, A060681, A318515, A318516, A318517.

%Y Cf. also A318508.

%K nonn,base

%O 1,4

%A _Antti Karttunen_, Aug 28 2018