%I #8 May 08 2019 22:19:10
%S 1,2,3,4,3,5,3,6,7,8,3,9,3,10,11,12,3,13,3,14,15,16,3,17,12,14,18,19,
%T 3,20,3,21,22,23,24,25,3,26,27,28,3,29,3,30,31,32,3,33,34,35,36,37,3,
%U 38,39,40,41,42,3,43,3,44,45,46,47,48,3,49,50,51,3,52,3,53,54,55,56,57,3,58,59,49,3,60,61,62,63,64,3,65,66,67,68,51,69,70,3,71
%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = [A000203(n), A009194(n)] for all other numbers, except f(p) = 0 for odd primes.
%H Antti Karttunen, <a href="/A325384/b325384.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</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 A009194(n) = gcd(n,sigma(n));
%o Aux325384(n) = if((n%2)&&isprime(n),0,[sigma(n),A009194(n)]);
%o v325384 = rgs_transform(vector(up_to,n,Aux325384(n)));
%o A325384(n) = v325384[n];
%Y Cf. A000203, A009194, A300230, A305801, A325382, A325383.
%K nonn
%O 1,2
%A _Antti Karttunen_, May 08 2019
|