%I #7 Jan 13 2019 19:29:41
%S 1,1,2,3,4,3,5,6,7,6,8,6,9,10,11,12,13,10,14,12,15,16,17,12,18,19,20,
%T 21,22,12,23,24,18,24,25,19,26,27,25,24,28,19,29,30,31,32,33,24,34,30,
%U 35,36,37,27,38,39,40,41,42,24,43,44,45,46,47,48,49,46,50,36,51,39,52,53,38,54,55,39,56,46,57,58,59,39,60,61,62,58,63,39,64,65,55,66,67,46,68,61,69,58,70,46
%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => A049559(i) = A049559(j) and A160595(i) = A160595(j).
%C Restricted growth sequence transform of [A049559(n), A160595(n)].
%C For all i, j: a(i) = a(j) => A000010(i) = A000010(j).
%C For all i, j > 1:
%C a(i) = a(j) => A323374(i) = A323374(j).
%H Antti Karttunen, <a href="/A323373/b323373.txt">Table of n, a(n) for n = 1..65537</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 A049559(n) = gcd(eulerphi(n), n-1);
%o A160595(n) = if(1==n, n, numerator(eulerphi(n)/(n-1)));
%o v323373 = rgs_transform(vector(up_to, n, [A049559(n), A160595(n)]));
%o A323373(n) = v323373[n];
%Y Cf. A000010, A049559, A160595, A323374.
%Y Cf. also A323404.
%K nonn
%O 1,3
%A _Antti Karttunen_, Jan 13 2019