login
Lexicographically earliest infinite sequence such that a(i) = a(j) => A020639(i) = A020639(j) and A046523(i) = A046523(j) for all i, j.
3

%I #11 Oct 19 2019 21:26:55

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

%T 11,21,22,23,24,13,6,25,26,27,6,13,18,28,22,29,11,30,6,31,32,33,11,13,

%U 11,34,18,25,18,13,6,35,36,37,6,30,38,25,22,39,11,13,22,40,41,42,6,30,11,43,22,44,32,45,6,46,36,25,6,13,18,47,36,43,11,13,6,25,48,49,11,30,26,50,22,51,18,52

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

%C Restricted growth sequence transform of the ordered pair [A020639(n), A046523(n)], where A020639(n) gives the smallest prime factor of n, while A046523(n) gives the prime signature of n.

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

%H Antti Karttunen, <a href="/A328469/b328469.txt">Table of n, a(n) for n = 1..100000</a>

%o (PARI)

%o up_to = 100000;

%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 A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1);

%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523

%o Aux328469(n) = [A020639(n), A046523(n)];

%o v328469 = rgs_transform(vector(up_to, n, Aux328469(n)));

%o A328469(n) = v328469[n];

%Y Cf. A020639, A046523.

%Y Cf. also A101296, A291761, A328470, A328477, A318891, A286455.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 19 2019