int fabseq(int nth){ if (nth == 1 || nth == 2){ return 1; } int equ = (1/sqrt(5))*pow(((1+sqrt(5))/2), nth)-(1/sqrt(5))*pow((1-sqrt(5))/2, nth); return equ; }