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.

A366893 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366892(i) = A366892(j) for all i, j >= 0.

This page as a plain text file.
%I A366893 #6 Nov 04 2023 14:00:54
%S A366893 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 A366893 16,1,17,9,18,5,19,10,20,3,21,11,22,6,23,12,24,2,25,13,26,7,27,14,28,
%U A366893 4,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
%N A366893 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366892(i) = A366892(j) for all i, j >= 0.
%C A366893 Restricted growth sequence transform of A366892.
%H A366893 Antti Karttunen, <a href="/A366893/b366893.txt">Table of n, a(n) for n = 0..65537</a>
%o A366893 (PARI)
%o A366893 up_to = 65537;
%o A366893 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 A366893 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 A366893 A336652(n) = if(1==n,n,my(f=factor(n)); prod(i=1,#f~,if(2==f[i,1],1,-1+(((f[i,1]^(1+f[i,2]))-1) / (f[i,1]-1)))));
%o A366893 A366892(n) = A336652(A163511(n));
%o A366893 v366893 = rgs_transform(vector(1+up_to,n,A366892(n-1)));
%o A366893 A366893(n) = v366893[1+n];
%Y A366893 Cf. A163511, A336652, A366892.
%Y A366893 Cf. also A366806.
%Y A366893 Differs from A003602 for the first time at n=121, where a(121) = 24, while A003602(121) = 61.
%K A366893 nonn
%O A366893 0,4
%A A366893 _Antti Karttunen_, Nov 04 2023