06-25-2009, 04:16 AM
|
#29 (permalink)
|
|
The Addict
Join Date: May 2009
Posts: 287
Thanks: 5
|
Anyone who knows what I'm doing gets a cookie!
PHP Code:
<?php var $a, $b;
$t = pow(2, 10); $t = pow(($t * $t), 2);
// First for ($n = 0; $n <= $t; $n++) { $b = pow(-1, $n); $b *= 4; $b /= (2 * $n) + 1; }
$b %= 2;
// Next $t /= 2; for ($n = 0; $n <= $t; $n++) { $a = pow((1+(1/$n)), $n); } $a -= $b; ?>
It's not really inventive, just really CPU intensive. FYI please don't run this script.
Another try:
PHP Code:
<?php // Start $f = Array(); $f[0] = 0; $f[1] = 1;
// Note the pattern.... for ($n = 2; $n < 7; $n++) { $f[$n] = $f[$n - 1] + $f[$n - 2]; }
echo 'b: ' , $f[2] , ' ' , 'a: ' , $f[3];
?>
|
|
|
|