OFFSET
1,3
COMMENTS
Sequence has 512 terms, since every term except 0 corresponds to a nonempty subset of {1,2,3,4,5,6,7,8,9}.
A178788(a(n)) = 1. - Reinhard Zumkeller, Jun 30 2010
Number of terms in [10^(n-1), 10^n): 0, 9, 36, 84, 126, 126, 84, 36, 9, 1. - Robert G. Wilson v, Jul 20 2014
LINKS
Zak Seidov, Table of n, a(n) for n = 1..512 (full sequence)
Eric Weisstein's World of Mathematics, Digit
MATHEMATICA
Flatten@Table[FromDigits/@Subsets[Range[1, 9], {n}], {n, 0, 9}] (* Zak Seidov, May 19 2006 *)
PROG
(PARI) is_A009993(n)=Set(n=digits(n))==n \\ M. F. Hasler, Dec 11 2019
(PARI) forsubset(9, s, print1(fromdigits(Vec(s))", ")) \\ M. F. Hasler, Dec 11 2019
(Python)
from itertools import combinations
def afull(): return [0] + sorted(int("".join(c)) for d in range(1, 10) for c in combinations("123456789", d))
print(afull()) # Michael S. Branicky, Sep 16 2022
CROSSREFS
KEYWORD
nonn,fini,full,base
AUTHOR
STATUS
approved