OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
\\ Needs also code from A286622:
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; };
v305795 = rgs_transform(vector(up_to, n, A305794(n)));
A305795(n) = v305795[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 11 2018
STATUS
approved