Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #6 Oct 08 2019 16:26:31
%S 1,2,2,3,2,4,2,5,6,7,2,8,2,3,9,10,2,11,2,12,13,14,2,15,13,5,16,17,2,
%T 18,2,11,19,20,21,22,2,11,23,24,2,25,2,26,27,8,2,28,19,29,30,31,2,32,
%U 33,34,35,18,2,36,2,37,38,39,40,41,2,42,43,44,2,45,2,27,46,47,40,48,2,49,50,51,2,52,35,29,53,54,2,55,56,57,58,36,59,60,2,61,62,63,2,64,2,65,48
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A327963(i) = A327963(j) for all i, j.
%C Restricted growth sequence transform of A327963(n).
%H Antti Karttunen, <a href="/A328113/b328113.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 A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
%o A129251(n) = { my(f = factor(n)); sum(k=1, #f~, (f[k, 2]>=f[k, 1])); };
%o A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
%o A327963(n) = if(1==n,0,my(u=A003415(n)); if(!A129251(u),u,A276086(n)));
%o v328113 = rgs_transform(vector(up_to, n, A327963(n)));
%o A328113(n) = v328113[n];
%Y Cf. A003415, A129251, A276086, A327928, A327929, A327963.
%K nonn
%O 1,2
%A _Antti Karttunen_, Oct 07 2019