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 A262557 #38 Feb 13 2024 08:13:28 %S A262557 0,1,10,2,20,21,210,3,30,31,310,32,320,321,3210,4,40,41,410,42,420, %T A262557 421,4210,43,430,431,4310,432,4320,4321,43210,5,50,51,510,52,520,521, %U A262557 5210,53,530,531,5310,532,5320,5321,53210,54,540,541,5410,542,5420,5421 %N A262557 Numbers with digits in strictly decreasing order, sorted lexicographically. %C A262557 Original name: "Countdown sequences, allowing gaps." %C A262557 Only digits 0 through 9 are used. The last term is 9876543210. %C A262557 Equals A009995, sorted lexicographically. - _Reinhard Zumkeller_, Oct 14 2015 %C A262557 There are 2^k terms starting with digit k >= 0, they start at index 2^k. The countdown sequences, i.e., digits of the n-th term, are given in rows of A272011. - _M. F. Hasler_, Dec 11 2019 %D A262557 Donald S. McDonald, Email message to N. J. A. Sloane, Oct 14 2015. %H A262557 Reinhard Zumkeller, <a href="/A262557/b262557.txt">Table of n, a(n) for n = 1..1023</a> %F A262557 a(n) = A009995(A263328(n)); a(A263327(n)) = A009995(n). - _Reinhard Zumkeller_, Oct 15 2015 %t A262557 A262557[n_] := FromDigits[BitLength[n] - Flatten[Position[IntegerDigits[n, 2], 1]]]; Array[A262557, 100] (* or *) %t A262557 A262557full = Rest[Map[FromDigits, LexicographicSort[Subsets[Range[9, 0, -1]]]]] (* _Paolo Xausa_, Feb 13 2024 *) %o A262557 (Haskell) %o A262557 a262557 n = a262557_list !! (n-1) %o A262557 a262557_list = 0 : f [[0]] where %o A262557 f xss = if x < 9 then (map (read . concatMap show) zss) ++ f zss else [] %o A262557 where zss = (map (z :) $ map tail xss) ++ (map (z :) xss) %o A262557 z = x + 1; x = head $ head xss %o A262557 -- _Reinhard Zumkeller_, Oct 14 2015 %o A262557 (PARI) is_A262557 = is_A009995 %o A262557 apply( A262557(n)=fromdigits(Vecrev(vecextract([0..exponent(n+!n)],n))), [1..99]) %o A262557 # A262557=concat(apply(x(i)=concat(vector(i%10+1,j,if(j>1,x(i*10+j-2),i))),[0..9])) \\ _M. F. Hasler_, Dec 11 2019 %o A262557 (Python) %o A262557 from itertools import combinations %o A262557 afull = list(map(int, sorted("".join(c) for i in range(1, 11) for c in combinations("9876543210", i)))) # _Michael S. Branicky_, Feb 13 2024 %Y A262557 Cf. A009995, A263327, A263328. %K A262557 nonn,base,fini,full %O A262557 1,3 %A A262557 _N. J. A. Sloane_, Oct 14 2015 %E A262557 New name from _M. F. Hasler_, Dec 11 2019