login
A322861
Lexicographically earliest such sequence a that a(i) = a(j) => A278222(A285330(i)) = A278222(A285330(j)) for all i, j.
3
1, 2, 2, 2, 2, 3, 2, 2, 3, 4, 2, 3, 2, 4, 3, 2, 2, 3, 2, 4, 4, 4, 2, 4, 4, 4, 4, 5, 2, 5, 2, 2, 4, 4, 3, 3, 2, 4, 4, 4, 2, 6, 2, 6, 7, 4, 2, 4, 5, 4, 4, 6, 2, 3, 4, 5, 4, 4, 2, 7, 2, 4, 8, 2, 4, 6, 2, 4, 4, 6, 2, 9, 2, 4, 10, 6, 3, 6, 2, 6, 9, 4, 2, 8, 4, 4, 4, 6, 2, 7, 4, 11, 4, 4, 4, 4, 2, 5, 4, 4, 2, 6, 2, 6, 5
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A278222(A285330(n)).
For all i, j:
A322806(i) = A322806(j) => a(i) = a(j),
A322807(i) = A322807(j) => a(i) = a(j),
a(i) = a(j) => A322862(i) = A322862(j).
PROG
(PARI)
up_to = 65537;
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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
A285328(n) = { my(r); if((n > 1 && !bitand(n, (n-1))), (n/2), r=A007947(n); if(r==n, 1, n = n-r; while(A007947(n) <> r, n = n-r); n)); };
A285330(n) = if(moebius(n)<>0, A048675(n), A285328(n));
A278222(n) = A046523(A005940(1+n));
v322861 = rgs_transform(vector(up_to, n, A278222(A285330(n))));
A322861(n) = v322861[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 31 2018
STATUS
approved