A293011 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.
1, 2, 6, 4, 32, 48, 16, 8, 288, 64, 128, 8196, 256, 2048, 16896, 278528, 2097664, 589824, 4096, 8192, 8388609, 16384, 536870944, 268435488, 65536, 32768, 268959744, 17179869440, 524288, 4294967298, 1048576, 8589934594, 8589934596
Offset: 1
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..170
- Robert Israel, Color-coded logarithmic plot
Programs
-
Maple
# This code returns a(n) if A000120(a(n)) <= 3 and it can prove that no # smaller number with A000120 >= 4 can have A007953 large enough. If it # can't prove that, it returns FAIL. sdd:= n -> convert(convert(n,base,10),`+`): g:= proc(n) local found, k1, k2, k3, x, y, m,bd; found:= false; for k1 from 1 while not found do for k2 from 0 to k1-1 do x:= 2^k1 + 2^k2; if sdd(x) = 2*n then found:= true; break fi od od; for k1 from 0 to ilog2(x) do if sdd(2^k1) = n then x:= 2^k1; break fi od; m:= ilog10(x); bd:= floor(x/10^m)+9*m; if bd <= 3*n then return x fi; found:= false; for k1 from 2 to ilog2(x) while not found do for k2 from 1 to k1-1 while not found do for k3 from 0 to k2-1 do y:= 2^k1 + 2^k2 + 2^k3; if y > x or sdd(y) = 3*n then found:= true; break fi; od od od; if found then x:= min(x,y) fi; bd:= floor(x/10^m)+9*m; if bd <= 4*n then x else FAIL fi; end proc: map(g, [$1..50]); # Robert Israel, Nov 22 2019
-
PARI
a(n) = {my(k=1); while ((hammingweight(k))*n != sumdigits(k), k++); k; }
Comments