cp's OEIS Frontend

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.

A009995 Numbers with digits in strictly decreasing order. From the Macaulay expansion of n.

This page as a plain text file.
%I A009995 #54 Jul 08 2025 01:26:32
%S A009995 0,1,2,3,4,5,6,7,8,9,10,20,21,30,31,32,40,41,42,43,50,51,52,53,54,60,
%T A009995 61,62,63,64,65,70,71,72,73,74,75,76,80,81,82,83,84,85,86,87,90,91,92,
%U A009995 93,94,95,96,97,98,210,310,320,321,410,420,421,430,431,432,510,520,521,530
%N A009995 Numbers with digits in strictly decreasing order. From the Macaulay expansion of n.
%C A009995 There are precisely 1023 terms (corresponding to every nonempty subset of {0..9}).
%C A009995 A178788(a(n)) = 1. - _Reinhard Zumkeller_, Jun 30 2010
%C A009995 A193581(a(n)) > 0 for n > 9. - _Reinhard Zumkeller_, Aug 10 2011
%C A009995 A227362(a(n)) = a(n). - _Reinhard Zumkeller_, Jul 09 2013
%C A009995 For a fixed natural number r, any natural number n has a unique "Macaulay expansion" n = C(a_r,r)+C(a_{r-1},r-1)+...+C(a_1,1) with a_r > a_{r-1} > ... > a_1 >= 0. If r=10, concatenating the digits a_r, ..., a_1 gives the present sequence. The representation is valid for all n, but the concatenation only makes sense if all the a_i are < 10. - _N. J. A. Sloane_, Apr 05 2014
%C A009995 a(n) = A262557(A263327(n)); a(A263328(n)) = A262557(n). - _Reinhard Zumkeller_, Oct 15 2015
%H A009995 Reinhard Zumkeller, <a href="/A009995/b009995.txt">Table of n, a(n) for n = 1..1023</a>
%H A009995 B. Sury, <a href="http://www.jstor.org/stable/10.4169/amer.math.monthly.121.04.359">Macaulay Expansion</a>, Amer. Math. Monthly 121 (2014), no. 4, 359--360. MR3183022. [See p. 359. - _N. J. A. Sloane_, Apr 05 2014]
%H A009995 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Digit.html">Digit</a>.
%t A009995 Sort@ Flatten@ Table[FromDigits /@ Subsets[ Range[9, 0, -1], {n}], {n, 10}] (* _Zak Seidov_, May 10 2006 *)
%o A009995 (Haskell)
%o A009995 import Data.Set (fromList, minView, insert)
%o A009995 a009995 n = a009995_list !! n
%o A009995 a009995_list = 0 : f (fromList [1..9]) where
%o A009995    f s = case minView s of
%o A009995          Nothing     -> []
%o A009995          Just (m,s') -> m : f (foldl (flip insert) s' $
%o A009995                               map (10*m +) [0..m `mod` 10 - 1])
%o A009995 -- _Reinhard Zumkeller_, Aug 10 2011
%o A009995 (PARI) is(n)=fromdigits(vecsort(digits(n),,12))==n \\ _Charles R Greathouse IV_, Apr 16 2015
%Y A009995 Cf. A009993.
%Y A009995 Cf. A262557 (sorted lexicographically), A263327, A263328.
%K A009995 nonn,fini,full,base,look
%O A009995 1,3
%A A009995 _N. J. A. Sloane_