void fib(int **fib_sequence, int n) {
    int *heap_memory = malloc(sizeof(int) * n);
    for(int i = 0; i < n; i++) {
        if(i == 0) {heap_memory[i] = 0;}
        else if(i == 1 || i == 2) {heap_memory[i] = 1;}
        else {heap_memory[i] = heap_memory[i-2] + heap_memory[i-1];}
    }
    *fib_sequence = heap_memory;
}