login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366791 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366388(j) = A366388(j) and A366788(i) = A366788(j), for all i, j >= 1. 2

%I #9 Oct 23 2023 18:05:46

%S 1,1,2,1,3,2,4,1,5,3,6,2,5,4,7,1,8,5,9,3,10,6,11,2,12,5,13,4,11,7,14,

%T 1,15,8,16,5,17,9,13,3,18,10,8,6,14,11,19,2,10,12,20,5,21,13,22,4,5,

%U 11,20,7,6,14,11,1,19,15,23,8,24,16,6,5,16,17,25,9,12,13,24,3,26,18,19,10,15,8,26,6,8,14,16,11,27,19,6

%N Lexicographically earliest infinite sequence such that a(i) = a(j) => A366388(j) = A366388(j) and A366788(i) = A366788(j), for all i, j >= 1.

%C Restricted growth sequence transform of the ordered pair [A366388(n), A366788(n)].

%C For all i, j >= 1: A003602(i) = A003602(j) => a(i) = a(j).

%H Antti Karttunen, <a href="/A366791/b366791.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 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 A366388(n) = if(n<=2, 0, if(isprime(n), 1+A366388(primepi(n)), my(f=factor(n)); (apply(A366388, f[, 1])~ * f[, 2])));

%o Aux366791(n) = [A366388(n), A366388(A163511(n))];

%o v366791 = rgs_transform(vector(up_to, n, Aux366791(n)));

%o A366791(n) = v366791[n];

%Y Cf. A003602, A366388, A366788.

%Y Cf. also A334867, A365386, A365388 (compare the scatter plots).

%K nonn,look

%O 1,3

%A _Antti Karttunen_, Oct 23 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 13 09:21 EDT 2024. Contains 375904 sequences. (Running on oeis4.)