Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Oct 12 2023 16:59:37
%S 1,1,2,1,3,2,4,1,5,3,6,2,7,4,8,1,9,5,10,3,11,6,12,2,13,7,14,4,15,8,16,
%T 1,17,9,18,5,19,10,20,3,21,11,22,6,23,12,24,2,25,13,26,7,27,14,28,4,
%U 29,15,30,8,31,16,32,1,33,17,34,9,35,18,36,5,37,19,38,10,39,20,40,3,41,21,42,11,43,22,44,6,45,23,46,12,47,24,48,2,49,25,50
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A336158(i) = A336158(j), A336466(i) = A336466(j) and A336467(i) = A336467(j) for all i, j >= 1, where A336466 is fully multiplicative with a(p) = oddpart(p-1) for any prime p and A336467 is fully multiplicative with a(2) = 1 and a(p) = oddpart(p+1) for odd primes, and A336158(n) gives the prime signature of the odd part of n.
%C Restricted growth sequence transform of the triplet [A336158(n), A336466(n), A336467(n)].
%C For all i, j >= 1:
%C A003602(i) = A003602(j) => a(i) = a(j),
%C a(i) = a(j) => A366381(i) = A366381(j),
%C a(i) = a(j) => A335880(i) = A335880(j),
%C a(i) = a(j) => A336390(i) = A336390(j),
%C a(i) = a(j) => A336470(i) = A336470(j).
%H Antti Karttunen, <a href="/A366380/b366380.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 A000265(n) = (n>>valuation(n,2));
%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
%o A336158(n) = A046523(A000265(n));
%o A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
%o A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
%o A366380aux(n) = [A336158(n), A336466(n), A336467(n)];
%o v366380 = rgs_transform(vector(up_to,n,A366380aux(n)));
%o A366380(n) = v366380[n];
%Y Cf. A000265, A003602, A335880, A336158, A336466, A336467, A336470, A336390, A366381.
%Y Differs from A003602 and A351090 for the first time at n=153, where a(153) = 38, while A003602(153) = A351090(153) = 77.
%Y Differs from A365388 for the first time at n=99, where a(99) = 50, while A365388(99) = 41.
%K nonn
%O 1,3
%A _Antti Karttunen_, Oct 12 2023