Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #9 Oct 07 2023 21:39:40
%S 1,2,2,1,2,3,1,4,2,5,3,6,1,7,4,8,2,9,5,10,3,7,6,11,1,4,7,12,4,13,8,14,
%T 2,9,9,15,5,16,10,11,3,17,7,18,6,13,11,19,1,20,4,21,7,22,12,1,4,23,13,
%U 24,8,25,14,26,2,27,9,28,9,16,15,29,5,30,16,11,10,31,11,32,3,20,17,33,7,34,18,35,6,36,13,19
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A366285(i) = A366285(j) for all i, j >= 0, where A366285(n) is the denominator of n / A366275(n).
%C Restricted growth sequence transform of A366285.
%H Antti Karttunen, <a href="/A366286/b366286.txt">Table of n, a(n) for n = 0..65537</a>
%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%o (PARI)
%o up_to = 65537;
%o rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
%o A366285(n) = { my(u=A366275(n)); (u/gcd(n,u)); }; \\ Uses also the program given in A366275.
%o v366286 = rgs_transform(vector(1+up_to,n,A366285(n-1)));
%o A366286(n) = v366286[1+n];
%Y Cf. A057889, A163511, A366275, A366283, A366285.
%Y Cf. also A365393, A365431 (compare the scatter plots).
%K nonn,look
%O 0,2
%A _Antti Karttunen_, Oct 07 2023