OFFSET
0,2
COMMENTS
a(n) is the number of weak compositions (ordered partitions) into four parts 0, 1, 2, ..., 9. - Joerg Arndt, May 02 2017
The 4th row of A213651. - Omar E. Pol, May 02 2017
a(n) is the number of integers in the range 0 to 9999 whose sum of digits = n. There are 10000 numbers in the range 0 to 9999 and in this sequence they are distributed according to the sum of their digits (n). - Miquel Cerda, Jun 14 2017
EXAMPLE
a(0) = 1 because 0000 is the only plate which sums to 0.
a(1) = 4 because there are 4 plates which sum to 1: 0001, 0010, 0100 and 1000.
a(2) = 10 because there are 10 numbers whose digits sum to 2: 2, 11, 20, 101, 110, 200, 1001, 1010, 1100, 2000. - Miquel Cerda, Jun 14 2017
MATHEMATICA
Length /@ Split@ Sort@ Map[Total, IntegerDigits@ Range[0, 10^4 - 1]] (* Michael De Vlieger, May 03 2017 *)
PROG
(R)
library(dplyr)
data=expand.grid(0:9, 0:9, 0:9, 0:9, KEEP.OUT.ATTRS = FALSE)
data %>%
mutate(n=Var1+Var2+Var3+Var4) %>%
group_by(n) %>%
summarise(value=n()) -> suc
View(suc)
(PARI) { my(x='x+O('x^44)); Vec(sum(k=0, 9, x^k)^4) } \\ Joerg Arndt, May 02 2017
CROSSREFS
KEYWORD
nonn,fini,full,base
AUTHOR
Antonio Sánchez Chinchón, May 02 2017
STATUS
approved