The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A317330 a(n) is the smallest positive integer not yet in the sequence that contains a digit equal to the sum of the digits of a(n-1) (mod 10); a(1)=0. 2
 0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 20, 21, 23, 25, 27, 29, 31, 24, 26, 28, 30, 32, 35, 38, 41, 45, 39, 22, 34, 37, 40, 42, 36, 49, 33, 46, 50, 51, 56, 61, 47, 71, 48, 52, 57, 62, 58, 43, 67, 53, 68, 44, 78, 54, 59, 64, 60, 63, 69, 55, 70, 72, 79 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Up to n=150 the only consecutive terms in the sequence are 19,20,21; 50,51; 90,91; 100,101; 106,107; 108,109,110. Up to n=150 the sequence of first differences is bounded by -57 and 57 (in nonconsecutive terms). From Robert G. Wilson v, Jul 26 2018: (Start) It appears that every number appears. If so the inverse permutation would be: 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 21, 37, 22, 27, 23, ..., . (End) Yes, every number appears.  Every pandigital number must eventually appear, and for each d in [0,9] there are infinitely many pandigital numbers with digit sum == d (mod 10), so every number containing digit d will eventually appear. - Robert Israel, Aug 30 2018 LINKS Robert G. Wilson v, Table of n, a(n) for n = 1..10000 EXAMPLE a(5)=2 since a(4)=11 and 1+1 is congruent to 2 (mod 10). a(21)=20 since a(20)=19 and 1+9 is congruent to 0 (mod 10). MAPLE N:= 1000: # to get all terms before the first term > N A:= 0: for d from 0 to 9 do S[d]:= select(t -> member(d, convert(t, base, 10)), {\$1..N}) od: for n from 2 do   dd:= convert(convert(A[n-1], base, 10), `+`) mod 10;   if S[dd] = {} then break fi;   A[n]:= min(S[dd]);   for d from 0 to 9 do S[d]:= S[d] minus {A[n]} od: od: seq(A[i], i=1..n-1); # Robert Israel, Aug 30 2018 MATHEMATICA f[lst_List] := Block[{k = 1, l = Mod[Plus @@ IntegerDigits@lst[[-1]], 10]}, While[MemberQ[lst, k] || Union[MemberQ[{l}, #] & /@ IntegerDigits@k][[-1]] == False, k++]; Append[lst, k]]; Nest[f, {0}, 72] (* Robert G. Wilson v, Jul 26 2018 *) CROSSREFS Cf. A107353. Sequence in context: A143970 A093645 A182620 * A238880 A340138 A332177 Adjacent sequences:  A317327 A317328 A317329 * A317331 A317332 A317333 KEYWORD nonn,base AUTHOR Enrique Navarrete, Jul 25 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 14 12:11 EDT 2021. Contains 342949 sequences. (Running on oeis4.)