on 6d45ede help sign in
27 lines 647 B history raw
1---
2navhome: /docs
3sort: 2
4comments: true
5---
7# Math
91. Write a function that produces a list of the first `n`
10 triangular numbers. The `n`th triangular number is the sum
11 of the first `n` positive integers.
131. Using the program from the previous exercise, write a
14 function that produces the first `n` tetrahedral numbers.
15 The `n`th tetrahedral number is the sum of the first `n`
16 triangular numbers.
181. The Fibonacci numbers are defined on the natural numbers as
19 follows:
21 ```
22 fib(0) = 0
23 fib(1) = 1
24 fib(n) = fib(n-1) + fib(n-2)
25 ```
27 Write a function that computes the `nth` Fibonacci number.