OFFSET
1,3
COMMENTS
Restricted growth sequence transform of A351091.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
PROG
(PARI)
up_to = 20000;
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; };
A019565(n) = { my(m=1, p=1); while(n>0, p = nextprime(1+p); if(n%2, m *= p); n >>= 1); (m); };
A289813(n) = { my(d=digits(n, 3)); fromdigits(vector(#d, i, if (d[i]==1, 1, 0)), 2); }; \\ From A289813
v351093 = rgs_transform(vector(up_to, n, A351091(n)));
A351093(n) = v351093[n];
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Jan 31 2022
STATUS
approved