OFFSET
1,3
COMMENTS
There are precisely 1023 terms (corresponding to every nonempty subset of {0..9}).
A178788(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2010
A193581(a(n)) > 0 for n > 9. - Reinhard Zumkeller, Aug 10 2011
A227362(a(n)) = a(n). - Reinhard Zumkeller, Jul 09 2013
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
Reinhard Zumkeller, Table of n, a(n) for n = 1..1023
B. Sury, Macaulay Expansion, Amer. Math. Monthly 121 (2014), no. 4, 359--360. MR3183022. [See p. 359. - N. J. A. Sloane, Apr 05 2014]
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])
-- Reinhard Zumkeller, Aug 10 2011
(PARI) is(n)=fromdigits(vecsort(digits(n), , 12))==n \\ Charles R Greathouse IV, Apr 16 2015
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved