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