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 A072543 #26 Apr 28 2016 17:47:20 %S A072543 0,1,2,3,4,5,6,7,8,9,10,11,20,21,22,30,31,32,33,40,41,42,43,44,50,51, %T A072543 52,53,54,55,60,61,62,63,64,65,66,70,71,72,73,74,75,76,77,80,81,82,83, %U A072543 84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,110,111,200,201 %N A072543 Numbers whose largest decimal digit is also the initial digit. %C A072543 A054055(a(n)) = A000030(a(n)); %C A072543 the sequence differs from A009996, A032873 and A032907: a(66)=101 is not in A009996, a(67)=110 is not in A032873 and a(65)=100 is not in A032907. %H A072543 Reinhard Zumkeller, <a href="/A072543/b072543.txt">Table of n, a(n) for n = 1..10000</a> %e A072543 a(10^ 1) = 9 %e A072543 a(10^ 2) = 411 %e A072543 a(10^ 3) = 6216 %e A072543 a(10^ 4) = 73474 %e A072543 a(10^ 5) = 813826 %e A072543 a(10^ 6) = 8512170 %e A072543 a(10^ 7) = 88368780 %e A072543 a(10^ 8) = 911960211 %e A072543 a(10^ 9) = 9237655227 %e A072543 a(10^10) = 93323313303 %p A072543 for i from 1 to 10 do A[i]:= i-1 od: %p A072543 count:= 10: %p A072543 for i from 1 to 9 do P[i]:= [seq([j],j=0..i)]; od: %p A072543 for d from 2 to 4 do %p A072543 for x from 1 to 9 do %p A072543 for p in P[x] do %p A072543 count:= count+1; %p A072543 A[count]:= add(p[k]*10^(k-1),k=1..d-1) + x*10^(d-1); %p A072543 od: %p A072543 P[x]:= [seq(seq([op(v),t], v=P[x]),t=0..x)]; %p A072543 od %p A072543 od: %p A072543 seq(A[i],i=1..count); # _Robert Israel_, Feb 01 2015 %t A072543 Select[Range[0,250],Max[IntegerDigits[#]]==First[IntegerDigits[#]]&] (* _Harvey P. Dale_, Apr 28 2016 *) %o A072543 (Haskell) %o A072543 a072543 n = a072543_list !! (n-1) %o A072543 a072543_list = [x | x <- [0..], a054055 x == a000030 x] %o A072543 -- _Reinhard Zumkeller_, Apr 25 2012 %o A072543 (PARI) is(n)=n=digits(n); !#n || n[1]==vecmax(n) \\ _Charles R Greathouse IV_, Jan 02 2014 %o A072543 (PARI) a(n)={d = 0; r = 1; s = 0; i = 0; if(n == 1, 0, n-=2; while(n > sum(i=0, 9,(i+1)^d), n-=sum(i=0, 9, (i+1)^d); n++; d++); while(n >= (r+1)^d, n -= (r+1)^d; r++);s = r * 10^d; while(n, s += 10^i*(n%(r+1)); n \= (r+1); i++));s } \\ _David A. Corneth_, Jan 31 2015 %Y A072543 Cf. A072544. %K A072543 nonn,base,easy %O A072543 1,3 %A A072543 _Reinhard Zumkeller_, Aug 04 2002 %E A072543 Offset corrected by _Reinhard Zumkeller_, Apr 25 2012