Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #6 Jan 04 2019 17:37:45
%S 1,2,3,4,3,5,3,6,7,8,3,7,3,9,10,11,3,12,3,10,13,14,3,15,16,17,18,13,3,
%T 19,3,20,21,22,23,18,3,24,25,16,3,26,3,21,27,28,3,29,30,31,32,25,3,33,
%U 34,23,35,36,3,27,3,37,30,38,39,40,3,32,41,42,3,43,3,44,45,35,46,47,3,48,49,50,3,30,51,52,53,34,3,54,55,41,56,57,58,59,3,60,46,45,3,61,3,39
%N Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -1 if n is an odd prime, and f(n) = A060681(n) for all other numbers.
%C For all i, j:
%C a(i) = a(j) => A323076(i) = A323076(j),
%C a(i) = a(j) => A323077(i) = A323077(j).
%H Antti Karttunen, <a href="/A323079/b323079.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 A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
%o A323079aux(n) = if((n>2)&&isprime(n),-1,A060681(n));
%o v323079 = rgs_transform(vector(up_to,n,A323079aux(n)));
%o A323079(n) = v323079[n];
%Y Cf. A060681, A323076, A323077.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jan 04 2019