login
A328629
Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(A328627(i)) = A046523(A328627(j)) for all i, j.
4
1, 2, 2, 3, 4, 5, 2, 5, 6, 7, 8, 9, 4, 3, 5, 10, 11, 12, 13, 6, 14, 15, 3, 16, 17, 14, 3, 18, 19, 15, 2, 5, 5, 15, 3, 12, 14, 16, 18, 20, 21, 22, 23, 24, 16, 25, 26, 27, 19, 18, 28, 29, 10, 30, 31, 28, 24, 32, 33, 34, 4, 3, 3, 7, 8, 15, 5, 12, 28, 32, 33, 30, 19, 18, 12, 35, 36, 37, 31, 28, 38, 39, 15, 40, 41, 38, 18, 25, 26, 22, 13, 6, 6, 18, 19, 9, 42
OFFSET
0,2
COMMENTS
Restricted growth sequence transform of function f(n) = A046523(A328627(n)), or equally, of function g(n) = A278226(A328626(n)).
PROG
(PARI)
up_to = 32768;
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
A328627(n) = { my(m=1, p=2, d=0); while(n, d = lift(Mod(n, p)/(d+1)); m *= (p^d); n = n\p; p = nextprime(1+p)); (m); };
Aux328629(n) = A046523(A328627(n));
v328629 = rgs_transform(vector(1+up_to, n, Aux328629(n-1)));
A328629(n) = v328629[1+n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 25 2019
STATUS
approved