OFFSET
1,1
COMMENTS
a(n) is divisible by 9.
a(n) = 9 if n > 10 is prime.
LINKS
Robert Israel, Table of n, a(n) for n = 1..919
FORMULA
a(n) = (9/10) * Sum_{j | n, j <= 10} n! * ((n/j)!)^(-j) * binomial(10,j).
EXAMPLE
For n = 1 there are the numbers 1 to 9.
For n = 2 there are 9 two-digit numbers of the form dd and 81 with two distinct digits, for a total of 90.
For n = 3 there are 9 numbers of the form ddd and 648 with three distinct digits, for a total of 657.
For n = 4 there are 9 numbers of the form dddd, 243 of with two distinct digits each occurring twice, and 4536 with four distinct digits, for a total of 4788.
MAPLE
seq(9/10*add(n!/(n/j)!^j * binomial(10, j), j = select(`<=`, numtheory:-divisors(n), 10)), n=1..30);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Aug 14 2015
STATUS
approved