login
A304750
Restricted growth sequence transform of A292240(n), formed from 0-digits in ternary representation of A254103(n).
2
1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 4, 1, 1, 1, 1, 4, 1, 1, 1, 2, 5, 3, 4, 2, 1, 3, 4, 2, 1, 6, 7, 1, 1, 3, 4, 5, 1, 1, 1, 2, 8, 1, 1, 7, 5, 5, 5, 4, 1, 8, 8, 7, 5, 5, 5, 9, 1, 1, 1, 2, 10, 3, 4, 1, 1, 8, 8, 11, 5, 12, 13, 1, 1, 3, 4, 5, 1, 1, 1, 4, 14, 3, 4, 2, 1, 15, 16, 1, 8, 12, 13, 2, 8, 6, 7, 9, 1, 17, 18, 2, 14, 15, 16, 19, 8, 12
OFFSET
0,4
COMMENTS
For all i, j: a(i) = a(j) => A292241(i) = A292241(j).
LINKS
PROG
(PARI)
A254103(n) = if(!n, n, if(!(n%2), (3*A254103(n/2))-1, (3*(1+A254103((n-1)/2)))\2));
A291770(n) = { my(s=0, b=1, d); while(n>2, if(!(n%3), s += b); b <<= 1; n \= 3); (s); };
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; };
v304750 = rgs_transform(vector(65538, n, A292240(n-1)));
A304750(n) = v304750[1+n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 30 2018
STATUS
approved