This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A317330 #21 Aug 31 2018 03:35:59 %S A317330 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, %T A317330 31,24,26,28,30,32,35,38,41,45,39,22,34,37,40,42,36,49,33,46,50,51,56, %U A317330 61,47,71,48,52,57,62,58,43,67,53,68,44,78,54,59,64,60,63,69,55,70,72,79 %N 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. %C A317330 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. %C A317330 Up to n=150 the sequence of first differences is bounded by -57 and 57 (in nonconsecutive terms). %C A317330 From _Robert G. Wilson v_, Jul 26 2018: (Start) %C A317330 It appears that every number appears. %C A317330 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, ..., . %C A317330 (End) %C A317330 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 %H A317330 Robert G. Wilson v, <a href="/A317330/b317330.txt">Table of n, a(n) for n = 1..10000</a> %H A317330 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A317330 a(5)=2 since a(4)=11 and 1+1 is congruent to 2 (mod 10). %e A317330 a(21)=20 since a(20)=19 and 1+9 is congruent to 0 (mod 10). %p A317330 N:= 1000: # to get all terms before the first term > N %p A317330 A[1]:= 0: %p A317330 for d from 0 to 9 do S[d]:= select(t -> member(d, convert(t,base,10)), {$1..N}) od: %p A317330 for n from 2 do %p A317330 dd:= convert(convert(A[n-1],base,10),`+`) mod 10; %p A317330 if S[dd] = {} then break fi; %p A317330 A[n]:= min(S[dd]); %p A317330 for d from 0 to 9 do S[d]:= S[d] minus {A[n]} od: %p A317330 od: %p A317330 seq(A[i],i=1..n-1); # _Robert Israel_, Aug 30 2018 %t A317330 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 *) %Y A317330 Cf. A107353. %K A317330 nonn,base %O A317330 1,2 %A A317330 _Enrique Navarrete_, Jul 25 2018