login
Lexicographically earliest positive sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A324342(i) = A324342(j), for all i, j >= 0.
8

%I #6 Feb 24 2019 17:52:15

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

%T 21,22,23,24,2,4,7,13,25,14,18,22,26,27,28,29,30,31,32,33,34,35,36,37,

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

%N Lexicographically earliest positive sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A324342(i) = A324342(j), for all i, j >= 0.

%C Restricted growth sequence transform of the ordered pair [A278222(n), A324342(n)], or equally, of [A286622(n), A324342(n)].

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

%H Antti Karttunen, <a href="/A324343/b324343.txt">Table of n, a(n) for n = 0..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 A002110(n) = prod(i=1,n,prime(i));

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };

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

%o A278222(n) = A046523(A005940(1+n));

%o A030308(n,k) = bittest(n,k);

%o A283477(n) = prod(i=0,#binary(n),if(0==A030308(n,i),1,A030308(n,i)*A002110(1+i)));

%o A276150(n) = { my(s=0,m); forprime(p=2, , if(!n, return(s)); m = n%p; s += m; n = (n-m)/p); };

%o A324342(n) = A276150(A283477(n));

%o A324343aux(n) = [A278222(n), A324342(n)];

%o v324343 = rgs_transform(vector(1+up_to,n,A324343aux(n-1)));

%o A324343(n) = v324343[1+n];

%Y Cf. A278222, A286622, A324342, A324344.

%Y Cf. also A323889, A324345.

%K nonn

%O 0,2

%A _Antti Karttunen_, Feb 24 2019