|
|
A009995
|
|
Numbers with digits in strictly decreasing order. From the Macaulay expansion of n.
|
|
25
|
|
|
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, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 210, 310, 320, 321, 410, 420, 421, 430, 431, 432, 510, 520, 521, 530
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
There are precisely 1023 terms (corresponding to every nonempty subset of {0..9}).
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
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Digit.
|
|
MATHEMATICA
|
Sort@ Flatten@ Table[FromDigits /@ Subsets[ Range[9, 0, -1], {n}], {n, 10}] (* Zak Seidov, May 10 2006 *)
|
|
PROG
|
(Haskell)
import Data.Set (fromList, minView, insert)
a009995 n = a009995_list !! n
a009995_list = 0 : f (fromList [1..9]) where
f s = case minView s of
Nothing -> []
Just (m, s') -> m : f (foldl (flip insert) s' $
map (10*m +) [0..m `mod` 10 - 1])
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|