login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #7 Jan 17 2020 17:40:14

%S 1,2,3,2,4,3,5,2,6,4,7,3,8,5,9,2,10,6,11,4,12,7,13,3,9,8,6,5,14,9,15,

%T 2,16,10,17,6,18,11,19,4,20,12,21,7,9,13,22,3,12,9,23,8,24,6,25,5,26,

%U 14,27,9,28,15,12,2,29,16,30,10,31,17,32,6,33,18,34,11,25,19,35,4,6,20,36,12,37,21,38,7,39,9,40,13,41,22,42,3,43,12,16,9,44,23,45,8,46

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

%C Restricted growth sequence transform of A278220(n) (= A046523(A241909(n))).

%H Antti Karttunen, <a href="/A331280/b331280.txt">Table of n, a(n) for n = 1..65537</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</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 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from A046523

%o A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));

%o A278220(n) = A046523(A241909(n));

%o v331280 = rgs_transform(vector(up_to, n, A278220(n)));

%o A331280(n) = v331280[n];

%Y Cf. A046523, A241909, A278220.

%Y Cf. also A286621, A331299.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 17 2020