OFFSET
0,2
COMMENTS
EXAMPLE
a(4) = 7 because 4 = 10[4] becomes 21[4] = 9.
a(15) = 0 because 15 = 33[4] becomes 00[4] = 0.
PROG
(PARI) A256294(n, b=4)=!n+apply(t->(t+1)%b, n=digits(n, b))*vector(#n, i, b^(#n-i))~
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Mar 22 2015
STATUS
approved