login
A320110
Restricted growth sequence transform of function f: f(1) = 0, f(n) = A046523(A252463(n)) for n > 1.
3
1, 2, 3, 3, 3, 3, 3, 4, 4, 3, 3, 5, 3, 3, 5, 6, 3, 4, 3, 5, 5, 3, 3, 7, 4, 3, 6, 5, 3, 5, 3, 8, 5, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 5, 7, 3, 3, 9, 4, 4, 5, 5, 3, 6, 5, 7, 5, 3, 3, 10, 3, 3, 7, 11, 5, 5, 3, 5, 5, 5, 3, 12, 3, 3, 7, 5, 5, 5, 3, 9, 8, 3, 3, 10, 5, 3, 5, 7, 3, 7, 5, 5, 5, 3, 5, 13, 3, 4, 7, 7, 3, 5, 3, 7, 10
OFFSET
1,2
COMMENTS
For all i, j: a(i) = a(j) => A320111(i) = A320111(j).
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; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A252463(n) = if(!(n%2), n/2, A064989(n));
A320110aux(n) = if(1==n, 0, A046523(A252463(n)));
v320110 = rgs_transform(vector(up_to, n, A320110aux(n)));
A320110(n) = v320110[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 22 2018
STATUS
approved