login
A167403
Number of decimal numbers having n or fewer digits and having the sum of their digits equal to n.
3
1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92368, 352595, 1351142, 5194385, 20024980, 77384340, 299671971, 1162635441, 4518099300, 17583582225, 68522664400, 267350823015, 1044243559263, 4082760176300, 15977236602150, 62576817828876, 245279492151021
OFFSET
1,2
COMMENTS
a(3) = 10, because 10 decimal numbers have 3 or fewer digits and a digit sum of 3: 3, 30, 300, 12, 120, 201, 21, 210, 102, 111.
LINKS
J. M. Shunia and L. Sauras Altuzarra, Arithmetic terms for sums of multinomial coefficients, Ramanujan Journal, vol. 68, 2025.
FORMULA
a(n) = [x^n] ((x^10-1)/(x-1))^n.
a(n) = floor(((10^(10*n)-1)/(100^n-10^n))^n) mod 10^n, n > 0 (see Theorem 5.1 from our article). - Joseph M. Shunia and Lorenzo Sauras Altuzarra, Mar 27 2026
MAPLE
b:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i=0, 0,
add(b(n-j, i-1), j=0..min(n, 9)) ))
end:
a:= n-> b(n, n):
seq(a(n), n=1..30);
CROSSREFS
Column k=9 of A305161.
Sequence in context: A363781 A318115 A318116 * A318117 A001700 A088218
KEYWORD
base,easy,nonn
AUTHOR
Alois P. Heinz, Nov 02 2009
STATUS
approved