






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







































1
2
4
5
7
long Fibonacci (int n) {
if ( (n == 1) || (n == 2) ) return 1; else return Fibonacci (n-1) + Fibonacci (n-2);
}
long Fibonacci2 (int n) {
return (long) ((Math.pow((1.0+Math.sqrt(5.0)),n)- Math.pow((1.0-Math.sqrt(5.0)),n)) / (Math.sqrt(5) * Math.pow(2,n)));
}
8
10
11
a) The set of odd positive integers
b) The set of positive integer powers of 3
c) The set of polynomials with integer coefficients
13
14
16
17
19
20