Haskell:
factorial :: (Integral a) => a -> a factorial n = product [1..n] choose :: (Integral a, Num b) => a -> a -> b n `choose` k = fromIntegral $ factorial n `div` (factorial k * factorial (n - k)) easyLine :: (Integral a, Num b) => a -> b easyLine n = (2 * n) `choose` n
From Wikipedia
The sum of the squares of the elements of row n equals the middle element of row 2n...In general form: ∑k=0n(nk)2=(2nn) \sum_{k = 0}^{n} {n \choose k}^2 = {2n \choose n} k=0∑n(kn)2=(n2n)
The sum of the squares of the elements of row n equals the middle element of row 2n...In general form:
p.s. I got to use the new latex feature for that!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Haskell:
From Wikipedia
p.s. I got to use the new latex feature for that!