Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #5 Feb 12 2019 22:37:42
%S 1,2,2,3,2,4,2,5,3,6,2,5,2,7,4,8,2,9,2,8,6,10,2,8,3,11,5,12,2,13,2,12,
%T 7,14,4,8,2,15,10,12,2,16,2,17,5,18,2,12,3,19,11,20,2,21,6,17,14,22,2,
%U 8,2,23,8,17,7,24,2,25,15,26,2,12,2,27,9,28,4,29,2,17,8,30,2,12,10,31,18,20,2,21,6,32,22,33,11,17,2,34,12,12,2,35,2,25,13
%N Lexicographically earliest sequence such that a(i) = a(j) => A322994(i) = A322994(j), for all i, j >= 1.
%C Restricted growth sequence transform of A322994.
%H Antti Karttunen, <a href="/A323914/b323914.txt">Table of n, a(n) for n = 1..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 A000265(n) = (n/2^valuation(n, 2));
%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 A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
%o A322993(n) = if(1==n,0,A000265(A156552(n)));
%o A322994(n) = sumdiv(n,d,moebius(n/d)*A322993(d));
%o v323914 = rgs_transform(vector(up_to,n,A322994(n)));
%o A323914(n) = v323914[n];
%Y Cf. A156552, A297112, A322993, A322994.
%K nonn
%O 1,2
%A _Antti Karttunen_, Feb 12 2019