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 A139079 #13 Jun 28 2025 22:36:56 %S A139079 1,10,20,30,40,50,60,70,80,90,100,101,11,12,2,21,13,3,23,31,14,4,24, %T A139079 34,41,15,5,25,35,45,51,16,6,26,36,46,56,61,17,7,27,37,47,57,67,71,18, %U A139079 8,28,38,48,58,68,78,81,19,9,29,39,49,59,69,79,89,91,102,22,32,42,52,62,72 %N A139079 Smallest number not yet in the sequence that contains the last digit of the previous term, with a(1) = 1. %C A139079 This is a permutation of the positive integers. %H A139079 Michael De Vlieger, <a href="/A139079/b139079.txt">Table of n, a(n) for n = 1..10000</a> %p A139079 a := [1] ; for n from 2 to 100 do ldig := op(-1,a) mod 10 ; for c from 1 do if c in a then ; else dgs := convert(c,base,10) ; if ldig in dgs then a := [op(a),c] ; break; fi; fi; od: od: print(a) ; # _R. J. Mathar_ %t A139079 s={1};Do[k=1;Until[ContainsAny[IntegerDigits[k],Take[IntegerDigits[s[[-1]]],-1]]&&!MemberQ[s,k],k++];AppendTo[s,k],{m,71}];s (* _James C. McMahon_, Jun 28 2025 *) %Y A139079 Cf. A076654, A125886. %K A139079 base,nonn %O A139079 1,2 %A A139079 _Franklin T. Adams-Watters_, Jan 31 2009