%I #10 Oct 17 2022 08:37:24
%S 0,1,1,3,1,5,3,7,1,3,3,11,3,13,7,15,1,3,3,19,6,7,7,23,3,25,11,27,7,29,
%T 15,31,1,3,6,7,3,7,7,39,5,11,7,43,14,15,15,47,3,7,19,51,7,53,23,55,7,
%U 57,27,59,15,61,31,63,1,5,3,7,5,7,7,71,3,13,14,15
%N For any nonnegative integer n with binary expansion Sum_{k = 1..w} 2^e_k, let m be the least integer such that the values e_k mod m are all distinct; a(n) = Sum_{k = 1..w} 2^(e_k mod m).
%C See A293390 for the corresponding m's.
%H Rémy Sigrist, <a href="/A356365/b356365.txt">Table of n, a(n) for n = 0..8192</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A000120(a(n)) = A000120(n).
%F a(n) = 1 iff n is a power of 2.
%F a(2^k - 1) = 2^k - 1 for any k >= 0.
%e The first terms, alongside their binary expansions and the corresponding m's, are:
%e n a(n) bin(n) bin(a(n)) m
%e --- ---- ------- --------- -
%e 0 0 0 0 0
%e 1 1 1 1 1
%e 2 1 10 1 1
%e 3 3 11 11 2
%e 4 1 100 1 1
%e 5 5 101 101 3
%e 6 3 110 11 2
%e 7 7 111 111 3
%e 8 1 1000 1 1
%e 9 3 1001 11 2
%e 10 3 1010 11 3
%e 11 11 1011 1011 4
%e 12 3 1100 11 2
%e 13 13 1101 1101 4
%e 14 7 1110 111 3
%e 15 15 1111 1111 4
%e 16 1 10000 1 1
%o (PARI) a(n) = { my (b=vector(hammingweight(n))); for (i=1, #b, n-=2^b[i]=valuation(n,2);); for (m=1, oo, if (#Set(b%m)==#b, b%=m; break;);); sum(i=1, #b, 2^b[i]); }
%Y Cf. A000120, A064895, A293390.
%K nonn,base
%O 0,4
%A _Rémy Sigrist_, Oct 16 2022