cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A365386 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A365385(i) = A365385(j) for all i, j >= 1.

This page as a plain text file.
%I A365386 #12 Sep 07 2023 23:35:00
%S A365386 1,1,2,1,3,2,4,1,5,3,6,2,5,4,7,1,8,5,9,3,10,6,3,2,11,5,12,4,13,7,4,1,
%T A365386 14,8,15,5,16,9,12,3,9,10,8,6,17,3,6,2,10,11,18,5,11,12,17,4,17,13,11,
%U A365386 7,5,4,19,1,20,14,21,8,22,15,8,5,23,16,24,9,8,12,9,3,16,9,9,10,24,8,24,6,25,17,9,3,10,6,25
%N A365386 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A365385(i) = A365385(j) for all i, j >= 1.
%C A365386 Restricted growth sequence transform of the ordered pair [A331410(n), A365385(n)].
%C A365386 For all i, j: A365388(i) = A365388(j) => a(i) = a(j) => A365387(i) = A365387(j).
%H A365386 Antti Karttunen, <a href="/A365386/b365386.txt">Table of n, a(n) for n = 1..65537</a>
%o A365386 (PARI)
%o A365386 up_to = 65537;
%o A365386 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 A365386 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 A365386 A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
%o A365386 A365385(n) = A331410(A163511(n));
%o A365386 A365386aux(n) = [A331410(n),A365385(n)];
%o A365386 v365386 = rgs_transform(vector(up_to,n,A365386aux(n)));
%o A365386 A365386(n) = v365386[n];
%Y A365386 Cf. A003602, A163511, A331410, A365385, A365387, A365388.
%Y A365386 Cf. also A334867.
%K A365386 nonn,look
%O A365386 1,3
%A A365386 _Antti Karttunen_, Sep 03 2023