Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #32 Nov 23 2019 00:50:43
%S 1,2,6,4,32,48,16,8,288,64,128,8196,256,2048,16896,278528,2097664,
%T 589824,4096,8192,8388609,16384,536870944,268435488,65536,32768,
%U 268959744,17179869440,524288,4294967298,1048576,8589934594,8589934596
%N a(n) is the smallest positive k such that f(k) = n*g(k) where f = A007953 and g = A000120, or 0 if no such k exists.
%C Conjecture: a(n) > 0 for all n >= 1.
%C Numbers n such that a(n) is not a power of 2 are 3, 6, 9, 12, 15, 16, 17, 18, ...
%C a(21) = 8388609 = 2^23 + 1 is the second odd term of this sequence after a(1) = 1.
%C Smallest n such that a(n + 1) = a(n) + 2 is 32 and a(32) = 2*(2^32 + 1).
%C For n <= 170, A000120(a(n)) <= 2. - _Robert Israel_, Nov 22 2019
%H Robert Israel, <a href="/A293011/b293011.txt">Table of n, a(n) for n = 1..170</a>
%H Robert Israel, <a href="/A293011/a293011.png">Color-coded logarithmic plot</a>
%e a(9) = 288 = 2^8 + 2^5 because A007953(288) = 2 + 8 + 8 = 18, 18 / 2 = 9 and 288 is the least number with this property.
%p # This code returns a(n) if A000120(a(n)) <= 3 and it can prove that no
%p # smaller number with A000120 >= 4 can have A007953 large enough. If it
%p # can't prove that, it returns FAIL.
%p sdd:= n -> convert(convert(n,base,10),`+`):
%p g:= proc(n) local found, k1, k2, k3, x, y, m,bd;
%p found:= false;
%p for k1 from 1 while not found do
%p for k2 from 0 to k1-1 do
%p x:= 2^k1 + 2^k2;
%p if sdd(x) = 2*n then found:= true; break fi
%p od od;
%p for k1 from 0 to ilog2(x) do
%p if sdd(2^k1) = n then x:= 2^k1; break fi
%p od;
%p m:= ilog10(x);
%p bd:= floor(x/10^m)+9*m;
%p if bd <= 3*n then return x fi;
%p found:= false;
%p for k1 from 2 to ilog2(x) while not found do
%p for k2 from 1 to k1-1 while not found do
%p for k3 from 0 to k2-1 do
%p y:= 2^k1 + 2^k2 + 2^k3;
%p if y > x or sdd(y) = 3*n then found:= true; break fi;
%p od od od;
%p if found then x:= min(x,y) fi;
%p bd:= floor(x/10^m)+9*m;
%p if bd <= 4*n then x else FAIL fi;
%p end proc:
%p map(g, [$1..50]); # _Robert Israel_, Nov 22 2019
%o (PARI) a(n) = {my(k=1); while ((hammingweight(k))*n != sumdigits(k), k++); k; }
%Y Cf. A000120, A001370, A007953.
%K nonn,base,look
%O 1,2
%A _Altug Alkan_, Sep 28 2017