OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
\\ Needs also code from A305788:
up_to = 65537;
rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences, invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences, invec[i], i); outvec[i] = u; u++ )); outvec; };
v305815 = rgs_transform(vector(up_to, n, A305814(n)));
A305815(n) = v305815[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 11 2018
STATUS
approved