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 #11 Jan 03 2024 16:34:15
%S 1,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,
%T 3,1,16,9,17,5,18,10,19,3,20,11,21,6,22,12,23,2,24,13,25,7,26,14,27,4,
%U 27,15,13,8,14,3,28,1,29,16,30,9,31,17,32,5,33,18,34,10,35,19,36,3,37,20,38,11,39,21,40,6
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A366885(i) = A366885(j) for all i, j >= 0.
%C Restricted growth sequence transform of A366885.
%C Albeit quite ugly, the scatter plot is still interesting. - _Antti Karttunen_, Jan 03 2024
%H Antti Karttunen, <a href="/A366886/b366886.txt">Table of n, a(n) for n = 0..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 A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
%o A347385(n) = if(1==n,n, my(f=factor(n>>valuation(n, 2))); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1)));
%o A366885(n) = A347385(A163511(n));
%o v366886 = rgs_transform(vector(1+up_to,n,A366885(n-1)));
%o A366886(n) = v366886[1+n];
%Y Cf. A163511, A347385, A366885.
%Y Cf. also A366806, A366881, A366891 (compare the scatter plots).
%K nonn,look
%O 0,4
%A _Antti Karttunen_, Nov 04 2023