%I #11 Feb 01 2022 18:57:31
%S 1,1,2,1,2,2,3,1,4,2,5,2,6,3,7,1,5,4,3,2,8,5,2,2,9,6,10,3,11,7,12,1,
%T 10,5,12,4,13,3,14,2,10,8,13,5,15,2,11,2,16,9,10,6,11,10,6,3,8,11,2,7,
%U 3,12,17,1,17,10,6,5,7,12,5,4,3,13,18,3,6,14,3,2,19,10,20,8,21,13,22,5,20,15,23,2,24,11
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A351091(i) = A351091(j), for all i, j >= 1.
%C Restricted growth sequence transform of A351091.
%H Antti Karttunen, <a href="/A351093/b351093.txt">Table of n, a(n) for n = 1..20000</a>
%o (PARI)
%o up_to = 20000;
%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 A019565(n) = { my(m=1, p=1); while(n>0, p = nextprime(1+p); if(n%2, m *= p); n >>= 1); (m); };
%o A289813(n) = { my(d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); }; \\ From A289813
%o A351091(n) = { my(m=1); fordiv(n>>valuation(n,2),d,m *= A019565(A289813(d))); (m); };
%o v351093 = rgs_transform(vector(up_to, n, A351091(n)));
%o A351093(n) = v351093[n];
%Y Cf. A351090, A351091, A351094.
%K nonn,easy,look
%O 1,3
%A _Antti Karttunen_, Jan 31 2022