A180059 Smallest k such that binary weight of k*n is less than binary weight of k, or zero if no such k exists (for n = powers of 2).
0, 0, 11, 0, 13, 11, 23, 0, 29, 13, 47, 11, 79, 23, 47, 0, 61, 29, 27, 13, 55, 47, 23, 11, 41, 79, 19, 23, 53, 47, 95, 0, 125, 61, 59, 29, 111, 27, 55, 13, 25, 55, 143, 47, 47, 23, 47, 11, 209, 41, 91, 79, 29, 19, 149, 23, 575, 53, 139, 47, 277, 95, 191, 0, 253, 125, 107, 61
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
s={};Do[Do[If[Count[IntegerDigits[k x,2],1]
Zak Seidov, Oct 24 2013 *) -
PARI
a(n)=if((n<=1)||((n>>valuation(n, 2))==1), 0, my(k=3); while(hammingweight(k*n)>=hammingweight(k), k+=2); k ) \\ Charles R Greathouse IV, Oct 19 2013