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 #6 Oct 20 2019 21:45:54
%S 1,2,2,2,3,4,2,2,2,2,3,4,3,5,5,5,6,7,8,9,9,9,10,11,12,13,13,13,14,15,
%T 2,2,2,2,3,4,2,2,2,2,3,4,3,5,5,5,6,7,8,9,9,9,10,11,12,13,13,13,14,15,
%U 3,16,16,16,17,18,16,16,16,16,17,18,17,19,19,19,20,21,22,23,23,23,24,25,26,27,27,27,28,29,30,31,31,31,32,33,31,31,31,31,32,33
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(0) = 0 and for n > 0, f(n) = [A276088(n), A328575(n)], for all i, j.
%C Restricted growth sequence transform of function f, defined as: f(0) = 0 and for n > 0, f(n) = [A276088(n), A328575(n)].
%C For all i, j: a(i) = a(j) => A328114(i) = A328114(j).
%H Antti Karttunen, <a href="/A328576/b328576.txt">Table of n, a(n) for n = 0..32768</a>
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%o (PARI)
%o up_to = 32768;
%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 A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557
%o A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
%o A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
%o A276088(n) = { my(e=0, p=2); while(n && !(e=(n%p)), n = n/p; p = nextprime(1+p)); (e); };
%o A328575(n) = A003557(A032742(A276086(n)));
%o Aux328576(n) = if(!n,n,[A276088(n), A328575(n)]);
%o v328576 = rgs_transform(vector(1+up_to, n, Aux328576(n-1)));
%o A328576(n) = v328576[1+n];
%Y Cf. A003557, A032742, A276086, A276088, A328114, A328575, A328577.
%K nonn
%O 0,2
%A _Antti Karttunen_, Oct 20 2019