A n-substring of a number is a substring of its digits that sum to n.
For example, the 8-substrings of the number 352114 are:
(35)2114
3(521)14
35(2114)
A number is called 8-substring-friendly if every one of its digits belongs to a 8-substring.
For example, 352114 is 8-substring-friendly, but 26(5)44 is not.
For a given n, find T(n) the number of 8-substring-friendly numbers from 1 to 10^n.