login
A328113
Lexicographically earliest infinite sequence such that a(i) = a(j) => A327963(i) = A327963(j) for all i, j.
4
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 3, 9, 10, 2, 11, 2, 12, 13, 14, 2, 15, 13, 5, 16, 17, 2, 18, 2, 11, 19, 20, 21, 22, 2, 11, 23, 24, 2, 25, 2, 26, 27, 8, 2, 28, 19, 29, 30, 31, 2, 32, 33, 34, 35, 18, 2, 36, 2, 37, 38, 39, 40, 41, 2, 42, 43, 44, 2, 45, 2, 27, 46, 47, 40, 48, 2, 49, 50, 51, 2, 52, 35, 29, 53, 54, 2, 55, 56, 57, 58, 36, 59, 60, 2, 61, 62, 63, 2, 64, 2, 65, 48
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A327963(n).
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; };
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A129251(n) = { my(f = factor(n)); sum(k=1, #f~, (f[k, 2]>=f[k, 1])); };
A276086(n) = { my(i=0, m=1, pr=1, nextpr); while((n>0), i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m*=(prime(i)^((n%nextpr)/pr)); n-=(n%nextpr)); pr=nextpr); m; };
A327963(n) = if(1==n, 0, my(u=A003415(n)); if(!A129251(u), u, A276086(n)));
v328113 = rgs_transform(vector(up_to, n, A327963(n)));
A328113(n) = v328113[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2019
STATUS
approved