# Hmm.

Given two numbers, say x and y, and a recusively defined additive sequence such that each new term is the sum of the previous two terms, with x and y being the first two terms, and going until the 10th term as in the following...

3 5 8 13 21 34 55 89 144 233
2 7 9 16 25 41 66 107 173 280
3 4 7 11 18 29 47 76 123 199
4 5 9 14 23 37 60 97 157 254
3 8 11 19 30 49 79 128 207 335

... is there an easy way to find the sum of those 10 numbers? Using just the first two terms? Easy as in taking a few seconds to calculate in your head?

My easy way to do was a simple perl script...

```#!/bin/perl -w

\$x=\$ARGV;
\$y=\$ARGV;
\$z=0;
\$sum=\$y+\$x;

print "0  \$x\n1  \$y\n";

for (\$i=2;\$i<10;\$i++) {
\$z=\$x+\$y;
\$sum=\$sum+\$z;
\$x=\$y;
\$y=\$z;
print "\$i  \$z\n";
}

print "\nTotal: \$sum\n";```

... which works great, but doesn't fulfill the "in your head in a few seconds" qualifier. :P So my question is... does anyone know of a simple equation to put towards these questions that would fulfull the requirements? I've been playing with it for about a half hour doing random trial and error attempts using the first two terms, the number of terms, the tenth term, the sum of the ten terms, and more recently the difference between the two terms, but my random math skills aren't achieving me anything. :P

Someone out there has to know a way... :P
• Post a new comment

#### Error

Anonymous comments are disabled in this journal

default userpic