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

%I #6 Nov 12 2019 19:21:16

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

%T 21,2,22,23,24,25,26,2,27,28,29,2,30,2,16,31,32,2,33,34,35,36,37,2,38,

%U 39,40,41,42,2,43,2,44,45,46,47,48,2,49,50,51,2,52,2,53,54,55,47,56,2,57,58,59,2,60,61,62,63,64,2,65,66,67,68,69,70,71,2,72,73

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

%C Restricted growth sequence transform of A329380.

%C For all i, j:

%C A305800(i) = A305800(j) => a(i) = a(j),

%C a(i) = a(j) => A323599(i) = A323599(j).

%H Antti Karttunen, <a href="/A329381/b329381.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 A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };

%o A329380(n) = { my(m=1); fordiv(n,d,m *= A276086(d)^omega(n/d)); (m); };

%o v329381 = rgs_transform(vector(up_to, n, A329380(n)));

%o A329381(n) = v329381[n];

%Y Cf. A001221, A276086, A305800, A323599, A329380.

%Y Cf. also A329351.

%K nonn

%O 1,2

%A _Antti Karttunen_, Nov 12 2019