OFFSET
1,2
COMMENTS
Conjecture: a(n) > 0 for all n >= 1.
Numbers n such that a(n) is not a power of 2 are 3, 6, 9, 12, 15, 16, 17, 18, ...
a(21) = 8388609 = 2^23 + 1 is the second odd term of this sequence after a(1) = 1.
Smallest n such that a(n + 1) = a(n) + 2 is 32 and a(32) = 2*(2^32 + 1).
For n <= 170, A000120(a(n)) <= 2. - Robert Israel, Nov 22 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..170
Robert Israel, Color-coded logarithmic plot
EXAMPLE
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.
MAPLE
# This code returns a(n) if A000120(a(n)) <= 3 and it can prove that no
# 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
PROG
(PARI) a(n) = {my(k=1); while ((hammingweight(k))*n != sumdigits(k), k++); k; }
CROSSREFS
KEYWORD
AUTHOR
Altug Alkan, Sep 28 2017
STATUS
approved