login
Sequence is inverse permutation to A122397.
2

%I #10 Jan 04 2023 18:09:40

%S 1,2,3,4,8,5,11,7,12,6,18,14,21,9,10,17,32,15,35,28,13,16,40,22,27,19,

%T 24,31,49,25,56,45,20,30,29,36,68,33,23,41,73,26,82,48,39,38,83,44,55,

%U 46,34,61,97,43,50,57,37,47,105,52,116,54,53,64,63,59,123,69,42,62,132

%N Sequence is inverse permutation to A122397.

%C Sequence is probably a permutation of the positive integers.

%H Robert Israel, <a href="/A122398/b122398.txt">Table of n, a(n) for n = 1..10000</a>

%p A[1]:= 1: A[2]:= 2: A[3]:= 3: B[1]:=1: B[2]:= 2: B[3]:= 3:

%p S:= {$4..300}:

%p for n from 4 do

%p P:= numtheory:-factorset(A[n-2]);

%p for s in S do

%p if member(igcd(s,A[n-2]),P) then

%p A[n]:= s; B[s]:= n; S:= S minus {s}; break

%p fi

%p od;

%p if not assigned(A[n]) then break fi;

%p od:

%p seq(B[i], i=1..S[1]-1); # _Robert Israel_, Jan 04 2023

%Y Cf. A122397.

%K nonn

%O 1,2

%A _Leroy Quet_, Aug 31 2006

%E Extended by _Ray Chandler_, Sep 05 2006