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 A137564 #43 Mar 22 2024 18:42:56 %S A137564 0,1,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20,21,2,23,24,25,26, %T A137564 27,28,29,30,31,32,3,34,35,36,37,38,39,40,41,42,43,4,45,46,47,48,49, %U A137564 50,51,52,53,54,5,56,57,58,59,60,61,62,63,64,65,6,67,68,69,70,71,72,73,74,75,76,7,78,79,80,81,82,83,84,85,86,87,8,89,90,91,92,93,94,95,96,97,98,9,10,10,102,103,104,105,106,107,108,109,10,1,12 %N A137564 a(n) is the number formed by removing from n all duplicate digits except the leftmost copy of each. %C A137564 Differs from A106612: a(100) = 10, A106612(100) = 100. %C A137564 Differs from A337864: a(101) = 10, A337864(101) = 101. %C A137564 a(n)=n iff n is a term of A010784. a(n)<n iff n is a term of A109303. %C A137564 A010784 is the sequence of distinct terms in this sequence, thus 9876543210 is the largest term here also, as no digit occurs more than once in any given term. Each term except 0 appears infinitely often in this sequence. - _Rick L. Shepherd_, Oct 03 2020 %H A137564 Reinhard Zumkeller, <a href="/A137564/b137564.txt">Table of n, a(n) for n = 0..10000</a> (corrected by Andrew Howroyd at the suggestion of Rodolfo Kurchan and Omar E. Pol, Oct 04 2020) %e A137564 a(100)=10 as a (second) 0 digit is dropped. a(1211323171)=1237. %e A137564 a(10...1) = 10 for any number of 0's and/or 1's in any order replacing the "..." in the term's index. - _Rick L. Shepherd_, Oct 03 2020 %t A137564 Table[FromDigits@ DeleteDuplicates@ IntegerDigits@ n, {n, 74}] (* _Michael De Vlieger_, Jun 01 2016 *) %o A137564 (PARI) a(n)={my(d=digits(n)); fromdigits(vecextract(d, vecsort(vecsort(d,,9))))} \\ _Andrew Howroyd_, Oct 04 2020 %o A137564 (Perl) sub a {my($n)=@_; my @seen; $n =~ s{.}{!$seen[$&]++ && $&}eg; $n} # _Kevin Ryde_, Oct 04 2020 %o A137564 (Python) %o A137564 def a(n): %o A137564 seen, out, s = set(), "", str(n) %o A137564 for d in s: %o A137564 if d not in seen: out += d; seen.add(d) %o A137564 return int(out) %o A137564 print([a(n) for n in range(113)]) # _Michael S. Branicky_, Jul 23 2022 %Y A137564 Cf. A106612, A010784 (fixed points), A109303 (non-fixed). %Y A137564 Cf. A043529 (equivalent in binary, except at n=0), A337864. %K A137564 base,easy,nonn %O A137564 0,3 %A A137564 _Rick L. Shepherd_, Jan 25 2008