%I #15 May 29 2021 20:00:57
%S 1,1,1,2,1,3,1,1,1,4,1,5,1,6,7,8,1,9,1,10,11,12,1,13,14,15,1,16,1,17,
%T 1,1,18,19,20,21,1,22,23,1,1,1,1,24,25,26,1,27,18,28,29,30,1,31,32,33,
%U 34,35,1,36,1,37,38,39,40,41,1,42,43,44,1,45,1,46,47,48,49,50,1,51,11,52,1,53,54,55,56,57,1,58,59,60,61,62,63,64,1,65,66,11,1
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A344592(i) = A344592(j), for all i, j >= 1.
%C Restricted growth sequence transform of A344592, where A344592(n) = A003557(A276086(A108951(n))).
%C For all i, j: a(i) = a(j) => A329344(i) = A329344(j).
%H Antti Karttunen, <a href="/A344593/b344593.txt">Table of n, a(n) for n = 1..65537</a>
%e Both a(14) = 6 and a(32768) = 6, because A344592(14) = 11 is the sixth distinct value occurring in A344592, and A344592(32768) = A003557(A276086(A108951(32768))) = A003557(A276086(32768)) = A003557(401115) = A003557(3 * 5 * 11^2 * 13 * 17) = 11 also, which is the second time 11 occurs in A344592.
%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 A034386(n) = prod(i=1, primepi(n), prime(i));
%o A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) }; \\ From A108951
%o A328572(n) = { my(m=1, p=2); while(n, if(n%p, m *= p^((n%p)-1)); n = n\p; p = nextprime(1+p)); (m); };
%o A344592(n) = A328572(A108951(n));
%o v344593 = rgs_transform(vector(up_to, n, A344592(n)));
%o A344593(n) = v344593[n];
%Y Cf. A003557, A108951, A276086, A324886, A329344, A344591 (positions of ones), A344592.
%Y Cf. also A329045, A329345, A344594.
%K nonn
%O 1,4
%A _Antti Karttunen_, May 26 2021