OFFSET
1,2
LINKS
EXAMPLE
A309668(5) = 3, hence a(3) = 5.
MAPLE
S:= [$1..100]:
for n from 1 while S <> [] do
for i from 1 to nops(S) do
s:= S[i];
if ilog2(n*s+n-1) > ilog2(n*s-1) then
A[s]:= n;
S:= subsop(i=NULL, S);
break
fi
od od:
seq(A[i], i=1..100); # Robert Israel, Apr 23 2020
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Aug 14 2019
STATUS
approved