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 #9 Dec 30 2018 07:55:39
%S 1,2,3,4,3,5,3,6,7,8,3,9,3,10,11,12,3,13,3,10,14,15,3,16,17,18,19,20,
%T 3,14,3,21,22,23,24,25,3,26,27,15,3,28,3,29,30,31,3,32,33,24,34,35,3,
%U 36,37,29,38,39,3,22,3,40,41,42,43,44,3,45,46,33,3,47,3,48,49,50,51,52,3,18,53,54,3,44,55,56,57,58,3,59,60,61,62,63,64,65,3,66,67,37,3
%N Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd prime, and f(n) = A242424(n) for all other numbers.
%C For all i, j: a(i) = a(j) => A087436(i) = A087436(j).
%H Antti Karttunen, <a href="/A322824/b322824.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 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A242424(n) = if(1==n,n,prime(bigomega(n))*A064989(n));
%o A322824aux(n) = if((n>2)&&isprime(n),0,A242424(n));
%o v322824 = rgs_transform(vector(up_to,n,A322824aux(n)));
%o A322824(n) = v322824[n];
%Y Cf. A087436, A242424, A322814.
%K nonn
%O 1,2
%A _Antti Karttunen_, Dec 29 2018