OFFSET
1,4
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..59049
PROG
(PARI)
\\ Needs also program from A356867:
up_to = 59049; \\ = 3^10.
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; };
v365715 = rgs_transform(vector(up_to, n, A365465(n)));
A365715(n) = v365715[n];
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Sep 17 2023
STATUS
approved