%N a(0)=1. Let S = string of digits of a(0),a(1),a(2),... To get a(n+1) (n>=0), subtract next element of S from a(n) if that would give a positive number different from a(0),...,a(n), otherwise add it to a(n).
%C A base-dependent variant of Recamán's sequence A005132.
%D Eric Angelini, Posting to Sequence Fans Mailing List, Mar 06 2012
%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>
%Y Cf. A005132, A210022 (for S), A210025, A210026.
%A _N. J. A. Sloane_, Mar 16 2012
%E Corrected and extended by _Max Alekseyev_, Nov 11 2012