
EXAMPLE

a(1)= 0 because there are no 1d terms in A116700
a(1)= 45 because there are 45 2d terms in A116700:
12,21,23,31,32,34,41,42,43,45,51,52,53,54,56,61,62,63,64,65,67,71,72,73,74,75,76,78,81,82,83,84,85,86,87,89,91,92,93,94,95,96,97,98,99.


MATHEMATICA

s="1"; ss={}; Do[tsn=ToString[n]; If[ !StringFreeQ[s, tsn], AppendTo[ss, n]]; s=s<>tsn, {n, 2, 99999}]; Table[Length[Select[ss, 10^(n1)<=#<10^n&]], {n, 1, 5}]
