myMath = {
//Calculate Factorial
fact : function ( n ) {
if ( n === 0 ) {
return 1;
} else {
return n*myMath.fact(n-1);
}
}
//Write the sequence of Fibonacci number
,fibo : function ( n ) {
f = [];f[0]=0;f[1]=1;
for(i=0;i
if(i>1) {
f.push( f[i-1] + f[i-2] );
}
}
return (f.join());
}
}
//Add all the natural numbers below one thousand that are multiples of 3 or 5.

### Like this:

Like Loading...

*Related*

Furthermore the prime numbers have several properties that the number 1 lacks such as the relationship of the number to its corresponding value of or the sum of divisors function. The prime-counting function n is defined as the number of primes up to n. The second equality is a consequence of the fundamental theorem of arithmetics and shows that the zeta function is deeply connected with prime numbers.