Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Jul 20 2020 02:08:46
%S 1,1,2,1,2,3,1,1,2,2,3,4,1,5,4,1,2,6,4,7,4,8,7,3,5,5,2,1,4,8,1,5,2,4,
%T 3,9,4,10,2,11,4,12,8,8,2,13,14,4,1,5,7,1,7,3,1,5,4,4,8,6,1,5,2,1,2,2,
%U 4,3,4,10,7,6,15,6,8,16,7,8,6,2,4,12,8,17,6,18,3,14
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A324058(i) = A324058(j) for all i, j >= 0.
%C Restricted growth sequence transform of A324058.
%H Antti Karttunen, <a href="/A336320/b336320.txt">Table of n, a(n) for n = 0..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 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
%o A324121(n) = gcd(sigma(n),n*numdiv(n));
%o A324058(n) = A324121(A005940(1+n));
%o v336320 = rgs_transform(vector(1+up_to,n,A324058(n-1)));
%o A336320(n) = v336320[1+n];
%Y Cf. A005940, A324121, A324058.
%Y Cf. also A286622.
%K nonn
%O 0,3
%A _Antti Karttunen_, Jul 19 2020