line 9 causes segmentation error
void fib(int **sequence_pt, int n) {
    int num = 1;
    int prev = 0;
    int new_num;
    
    *sequence_pt = malloc(sizeof(int) * n);
    *sequence_pt[0] = 0;  // n >= 1 by assumption
    for (int i = 1; i < n; i++) {
        *sequence_pt[i] = num;
        new_num = num + prev;
        prev = num;
        num = new_num;
    }
}