on cd02e96 help sign in
26 lines 632 B history raw
1---
2sort: 2
3comments: true
4---
6# Math
81. Write a function that produces a list of the first `n`
9 triangular numbers. The `n`th triangular number is the sum
10 of the first `n` positive integers.
121. Using the program from the previous exercise, write a
13 function that produces the first `n` tetrahedral numbers.
14 The `n`th tetrahedral number is the sum of the first `n`
15 triangular numbers.
171. The Fibonacci numbers are defined on the natural numbers as
18 follows:
20 ```
21 fib(0) = 0
22 fib(1) = 1
23 fib(n) = fib(n-1) + fib(n-2)
24 ```
26 Write a function that computes the `nth` Fibonacci number.