View Single Post
Old 06-25-2009, 04:16 AM   #29 (permalink)
adamdecaf
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

Anyone who knows what I'm doing gets a cookie!

PHP Code:
<?php
var $a$b;

$t pow(210);
    
$t pow(($t $t), 2);

// First
    
for ($n 0$n <= $t$n++) {
       
$b pow(-1$n);
           
$b *= 4;
       
$b /= ($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];

?>
__________________
My Site
adamdecaf is offline  
Reply With Quote