%I #14 Jun 01 2024 08:14:41
%S 1,2,3,2,4,5,6,2,3,7,8,5,9,10,11,2,12,5,13,7,14,15,16,5,4,17,3,10,18,
%T 19,20,2,21,22,23,5,24,25,26,7,27,28,29,15,11,30,31,5,6,7,32,17,33,5,
%U 34,10,35,36,37,19,38,39,14,2,40,41,42,22,43,28,44,5,45,46,11,25,47,48,49,7,3,50,51,28,52,53,54,15,55,19,56,30,57,58,59,5,60,10,21,7,61,62,63,17,64
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A020639(i) = A020639(j) and A278221(i) = A278221(j), for all i, j >= 1.
%C Restricted growth sequence transform of the ordered pair [A020639(n), A278221(n)].
%C For all i, j:
%C A324400(i) = A324400(j) => A336146(i) = A336146(j) => a(i) = a(j),
%C a(i) = a(j) => A243055(i) = A243055(j),
%C a(i) = a(j) => A336150(i) = A336150(j).
%H Antti Karttunen, <a href="/A336147/b336147.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</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 A020639(n) = if(1==n, n, factor(n)[1, 1]);
%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
%o A278221(n) = A046523(A122111(n));
%o Aux336147(n) = [A020639(n),A278221(n)];
%o v336147 = rgs_transform(vector(up_to, n, Aux336147(n)));
%o A336147(n) = v336147[n];
%Y Cf. A020639, A046523, A122111, A278221.
%Y Cf. also A243055, A286621, A318891, A324400, A336146, A336148, A336149, A336150.
%Y First differs from A322590 at a(70) = 28 instead of 44.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jul 12 2020