Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Aug 14 2023 08:34:48
%S 1,1,2,1,3,4,5,1,5,2,6,7,8,9,10,1,11,12,13,14,15,16,17,18,19,6,20,21,
%T 22,23,24,1,25,26,27,28,29,30,17,31,32,33,34,9,35,25,36,37,34,38,39,5,
%U 40,41,29,42,43,44,45,46,47,48,49,1,50,51,52,53,54,55,56,57,58,59,44,60,61,41,62,63,34,64
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A294898(i) = A294898(j) and A329697(i) = A329697(j), for all i, j >= 1.
%C Restricted growth sequence transform of the ordered pair [A294898(n), A329697(n)].
%H Antti Karttunen, <a href="/A364577/b364577.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 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
%o A294898(n) = (A005187(n)-sigma(n));
%o A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));Aux364577(n) = [A294898(n), A329697(n)];
%o v364577 = rgs_transform(vector(up_to, n, Aux364577(n)));
%o A364577(n) = v364577[n];
%Y Cf. A000203, A005187, A294898, A329697.
%Y Cf. also A318311, A336473.
%K nonn
%O 1,3
%A _Antti Karttunen_, Aug 12 2023