%I #13 Jan 21 2020 18:21:58
%S 1,2,3,4,3,5,3,5,6,7,3,8,3,9,10,11,3,12,3,13,14,15,3,16,17,18,19,20,3,
%T 21,3,7,22,23,24,19,3,25,26,27,3,28,3,29,30,31,3,13,32,33,34,35,3,36,
%U 37,38,39,40,3,41,3,42,43,10,44,45,3,46,47,48,3,36,3,49,50,51,52,53,3,54,17,55,3,56,57,58,59,60,3,61,62,63,64,65,66,27,3,67,68,69,3,70,3,71,72
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = min(n, A225546(n)) for all other n, except for odd primes p, f(p) = 0.
%C For all i, j:
%C A305801(i) = A305801(j) => a(i) = a(j),
%C a(i) = a(j) => A064179(i) = A064179(j),
%C a(i) = a(j) => A064547(i) = A064547(j),
%C a(i) = a(j) => A302777(i) = A302777(j),
%C a(i) = a(j) => A331308(i) = A331308(j),
%C a(i) = a(j) => A331287(i) = A331287(j),
%C a(i) = a(j) => A331592(i) = A331592(j).
%H Antti Karttunen, <a href="/A331301/b331301.txt">Table of n, a(n) for n = 1..100000</a>
%o (PARI)
%o up_to = 10000;
%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 Aux331301(n) = if((n%2)&&isprime(n),0,A331288(n)); \\ Needs also code from A331288.
%o v331301 = rgs_transform(vector(up_to, n, Aux331301(n)));
%o A331301(n) = v331301[n];
%Y Cf. A019565, A225546, A305801, A331174, A331288.
%Y Cf. also A064179, A064547, A302777, A331308, A331287, A331592.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jan 21 2020
|