OFFSET
0,12
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..10000 (First 1001 terms from Paolo P. Lava)
EXAMPLE
From a(0) to a(9) there are no available preceding digits to form n;
a(10) = 1 because we can pick up 1 and 0 and there is just this possibility to form 10;
a(11) = 2 because we can pick up 1 and another 1 from number 10 and we can do this in two different ways; etc.
MAPLE
P:=proc(q) local a, b, c, j, k, n, t, v; v:=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
t:=array(1..10); for k from 1 to 10 do t[k]:=1; od;
for n from 10 to q do a:=convert(n, base, 10); b:=1; for k in {op(a)} do c:=numboccur(k, a);
for j from 0 to c-1 do b:=b*(t[k+1]-j); od; t[k+1]:=t[k+1]+c; od; v:=[op(v), b];
od; op(v); end: P(100);
MATHEMATICA
a[n_] := Block[{c = Count[ Sort[ Flatten[ IntegerDigits[ Range[0, n -1]]]], #] & /@ Range[0, 9], d = Count[ Sort[ IntegerDigits[n]], #] & /@ Range[0, 9]}, Product[ d[[j]]!*Binomial[c[[j]], d[[j]]], {j, 10}]]; Array[a, 69, 0] (* Robert G. Wilson v, Jul 17 2026 *)
CROSSREFS
KEYWORD
nonn,base,easy,new
AUTHOR
Paolo P. Lava, Jul 05 2026
STATUS
approved
