OFFSET
0,2
FORMULA
PROG
(PARI) a(n) = my(v=digits(n, 3), s=Mod(0, 2)); for(i=1, #v, s+=v[i]; v[i]=3*v[i]+if(s, 2)); fromdigits(v, 9); \\ Kevin Ryde, Oct 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 29 2009
STATUS
approved