vimwiki/tech/pascals_triangle.wiki

22 lines
665 B
Plaintext
Raw Normal View History

2022-03-04 04:00:01 +00:00
= Pascals Triangle =
== Construction ==
Pascals triangle is constructed via staggering numbers in rows, and making each
entry equal to the sum of the two entries above it.
For some entry `(i,j)` where `i` is the row and `j` is the column, the value
can be calculated via
`f(i,j) = f(i-1, j-1) + f(i-1,j)`
== Patterns ==
* The sum of elements in a row is twice the sum of the row proceeding it. Or in
other words, the sum of the elements in row `n` is `2^n`.
* The sum of the square of the elements of row `n` is equal to the middle
element of row `2n`
* For some row `n` where `n` is prime, all terms in that row except for the 1s
are multiples of `p`