%I #6 Jul 17 2020 22:58:26
%S 1,2,2,3,2,3,2,4,5,3,2,4,2,3,5,6,2,7,2,4,5,3,2,6,3,3,8,4,2,7,2,9,5,3,
%T 3,10,2,3,5,6,2,7,2,4,8,3,2,9,5,4,5,4,2,11,3,6,5,3,2,10,2,3,8,12,3,7,
%U 2,4,5,4,2,13,2,3,4,4,5,7,2,9,14,3,2,10,3,3,5,6,2,11,5,4,5,3,3,12,2,7,8,6,2,7,2,6,4
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(A336120(i)) = A278222(A336120(j)) and A278222(A336125(i)) = A278222(A336125(j)) for all i, j >= 1.
%C Restricted growth sequence transform of the ordered pair [A336312(n), A336313(n)].
%C For all i, j:
%C A305800(i) = A305800(j) => a(i) = a(j) => A001222(i) = A001222(j).
%H Antti Karttunen, <a href="/A336311/b336311.txt">Table of n, a(n) for n = 1..65537</a>
%o (PARI)
%o \\ Needs also code from A336120, A336124, A336125, etc:
%o up_to = 1024;
%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 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
%o A278222(n) = A046523(A005940(1+n));
%o Aux336311(n) = [A278222(A336120(n)),A278222(A336125(n))];
%o v336311 = rgs_transform(vector(up_to,n,Aux336311(n)));
%o A336311(n) = v336311[n];
%Y Cf. A001222, A278222, A336120, A336124, A336125.
%Y Cf. also A292584, A305800, A336312, A336313.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jul 17 2020