Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
public int binet(int n)
{
return ((1/Math.sqrt(5))*((((Math.pow((1+Math.sqrt(5))/2))), n)-(Math.pow((1-Math.sqrt(5))/2),n)));
}
public int binet(int n)
{
return (int) ( (1/Math.sqrt(5)) * ( ( Math.pow(1+Math.sqrt(5)/2, n)) - (Math.pow(1-Math.sqrt(5)/2,n))) );
}
double a = 1/Math.sqrt(5);
double b = Math.pow(1+Math.sqrt(5)/2, n);
double c = Math.pow(1-Math.sqrt(5)/2, n);
return (int) ( a * ( b - c) );
public static int binet(int n)
{
double a = 1/Math.sqrt(5);
double b = (1+Math.sqrt(5))/2.0;
double c = (1-Math.sqrt(5))/2.0;
double d = Math.pow(b, n);
double e = Math.pow(c, n);
return (int) (a*(d-e));
}