OFFSET
1,2
COMMENTS
Note that we are counting 0 when it occurs as a digit of n, but are not counting any other integers as divisors of 0. (If we did, there would be infinitely many of them; every integer divides 0.) [From Franklin T. Adams-Watters, May 29 2010]
EXAMPLE
a(56) = 11 because divisors of 56 are d1= {1, 2, 4, 7, 8, 14, 28, 56}; 56 has two substrings 5,6; divisors of 5 are d2= {1, 5}, and divisors of 6 are d3= {1, 2, 3,6} ; union of d1,d2,d3 gives 11 distinct divisors of 56 and all of its substrings: {1, 2, 3, 4, 5, 6, 7, 8, 14, 28, 56}.
MATHEMATICA
Table[id = IntegerDigits[n]; FLA = Flatten[Table[Partition[id, k, 1], {k, Length[id]}], 1]; fd = Union[FromDigits /@ FLA]; dv = Length[Union[Flatten[Divisors /@ fd]]], {n, 200}]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Zak Seidov, May 28 2010
STATUS
approved