%I #9 Feb 19 2019 18:20:04
%S 1,2,2,3,2,4,2,4,5,6,2,4,2,7,8,9,2,6,2,4,10,11,2,4,12,13,8,4,2,6,2,14,
%T 15,16,17,9,2,18,19,14,2,7,2,4,8,20,2,4,21,7,22,4,2,7,23,24,25,26,2,
%U 14,2,27,8,28,29,11,2,4,30,7,2,4,2,31,10,4,32,13,2,24,33,34,2,24,35,36,37,38,2,7,39,4,40,41,42,4,2,11,8,43,2,16,2,44,10
%N Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324180(n) for n > 1 and f(1) = -1.
%C For all i, j: a(i) = a(j) => A324120(i) = A324120(j).
%H Antti Karttunen, <a href="/A324181/b324181.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 A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
%o A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
%o A297112(n) = if(1==n, 0, 2^A297167(n));
%o A324180(n) = { my(v=0); fordiv(n, d, if(d<n, v = bitxor(v,A297112(d)))); (v); };
%o Aux324181(n) = if((1==n),-n,A324180(n));
%o v324181 = rgs_transform(vector(up_to, n, Aux324181(n)));
%o A324181(n) = v324181[n];
%Y Cf. A000040 (positions of 2's), A156552, A297112, A324120, A324180.
%Y Cf. also A300827, A323914, A324203.
%K nonn
%O 1,2
%A _Antti Karttunen_, Feb 19 2019