OFFSET
0,3
LINKS
Franklin T. Adams-Watters, Table of n, a(n) for n = 0..10000
PROG
(PARI) inbase(n, b)=local(r); r=[]; while(n>0, r=concat([n%b], r); n\=b); r
tobase(v, b)=local(r); for(i=1, #v, r=r*b+v[i]); r
a(n)=local(v); v=inbase(n, 10); for(k=2, #v, if(v[k-1]%2==1, v[k]=9-v[k])); tobase(v, 10)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Franklin T. Adams-Watters, Mar 05 2010
STATUS
approved