login
A322806
Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.
4
1, 2, 3, 3, 4, 5, 6, 4, 5, 7, 8, 9, 10, 11, 9, 6, 12, 13, 14, 15, 15, 16, 17, 18, 7, 19, 11, 20, 21, 22, 23, 8, 18, 24, 13, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 22, 38, 39, 40, 41, 42, 29, 43, 44, 45, 46, 47, 48, 49, 50, 10, 37, 51, 52, 28, 53, 54, 55, 56, 57, 58, 59, 60, 25, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 38
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A285330.
LINKS
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; };
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
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(issquarefree(n), A048675(n), A285328(n));
v322806 = rgs_transform(vector(up_to, n, A285330(n)));
A322806(n) = v322806[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 26 2018
STATUS
approved