1,2

Robert Israel, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

A309668(5) = 3, hence a(3) = 5.

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

Cf. A309668.

Sequence in context: A266415 A132664 A072029 * A309668 A238758 A065652

Adjacent sequences: A309731 A309732 A309733 * A309735 A309736 A309737

nonn,base,look

Rémy Sigrist, Aug 14 2019

approved