A380706 n is the a(n)-th nonnegative integer having its set of decimal digits.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1
Offset: 0
Examples
a(101) = 3 because 101 is the 3rd nonnegative integer having its set of decimal digits: 10, 100, 101: {0,1}.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..65536
Crossrefs
Cf. A326307 (the same for multiset).
Programs
-
Maple
p:= proc() 0 end: a:= proc(n) option remember; local t; t:= {convert(n, base, 10)[]}; p(t):= p(t)+1 end: seq(a(n), n=0..105);
-
Python
from collections import Counter from itertools import count, islice def agen(): # generator of terms digsetcount = Counter() for n in count(0): key = "".join(sorted(set(str(n)))) digsetcount[key] += 1 yield digsetcount[key] print(list(islice(agen(), 106))) # Michael S. Branicky, Jan 30 2025
Comments