Equation 3.1 is:
Pascal <- matrix(,nrow=11, ncol=11)
for (n in 0:10){
for (j in 0:n){
Pascal[n+1,j+1] <- choose(n-1,j) + choose(n-1,j-1)
}
}
print(Pascal, na.print = " ", quote = FALSE)
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
## [1,] 1
## [2,] 1 1
## [3,] 1 2 1
## [4,] 1 3 3 1
## [5,] 1 4 6 4 1
## [6,] 1 5 10 10 5 1
## [7,] 1 6 15 20 15 6 1
## [8,] 1 7 21 35 35 21 7 1
## [9,] 1 8 28 56 70 56 28 8 1
## [10,] 1 9 36 84 126 126 84 36 9 1
## [11,] 1 10 45 120 210 252 210 120 45 10 1