%I #15 Oct 09 2023 15:50:08
%S 1,2,2,1,2,3,1,1,2,4,3,5,1,6,1,1,2,7,4,8,3,9,5,10,1,11,6,12,1,13,1,1,
%T 2,7,7,8,4,14,8,15,3,16,9,17,5,18,10,19,1,20,11,21,6,22,12,23,1,13,13,
%U 24,1,25,1,26,2,27,7,28,7,29,8,30,4,31,14,12,8,32,15,33,3,5,16,34,9,22,17,35,5,36,18,19,10
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A366375(i) = A366375(j) for all i, j >= 0, where A366375(n) is the denominator of n / A332214(n).
%C Restricted growth sequence transform of A366375.
%H Antti Karttunen, <a href="/A366376/b366376.txt">Table of n, a(n) for n = 0..65537</a>
%o (PARI)
%o \\ Needs also program from A332214:
%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 A366375(n) = { my(u=A332214(n)); (u/gcd(n,u)); };
%o v366376 = rgs_transform(vector(1+up_to,n,A366375(n-1)));
%o A366376(n) = v366376[1+n];
%Y Cf. A332214, A366373, A366375.
%Y Cf. also A365393, A365431, A366286 (compare the scatter plots).
%K nonn,look
%O 0,2
%A _Antti Karttunen_, Oct 08 2023