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 #8 Jul 11 2019 15:48:04
%S 1,2,3,3,3,4,3,3,3,5,3,6,3,7,8,3,3,9,3,10,3,11,3,12,3,13,3,14,3,15,3,
%T 3,16,17,3,3,3,18,3,19,3,20,3,21,22,23,3,24,3,3,25,26,3,27,3,28,3,29,
%U 3,30,3,31,3,3,3,32,3,33,34,35,3,36,3,37,3,38,3,39,3,40,3,41,3,42,3,43,44,45,3,46,47,48,3,49,50,51,3,3,52,3,3,53,3,54,55
%N Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 if n > 2 and gcd(n,sigma(n)) = 1, with f(n) = n for all other numbers.
%C For all i, j:
%C A305801(i) = A305801(j) => A324401(i) = A324401(j) => a(i) = a(j),
%C a(i) = a(j) => A009194(i) = A009194(j) => A325964(i) = A325964(j).
%H Antti Karttunen, <a href="/A326202/b326202.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 Aux326202(n) = if((n>2) && (1==gcd(n,sigma(n))),0,n);
%o v326202 = rgs_transform(vector(up_to, n, Aux326202(n)));
%o A326202(n) = v326202[n];
%Y Cf. A000203, A009194, A014567, A305801, A324401, A325964.
%Y Cf. also A326200, A326201, A326203.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jul 11 2019