Kirby Urner wrote:
[snip...]

Adding n consecutive layers of this Christmas Tree gives n**3.


The first thing that came to my mind is Pascal's triangle; adding the number on the n_th line gives 2^n.



We looked up Tetra here:

http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?An
um=A000292

Great link! I especially like, given my previous observation, the following:

=====
           Consider the square array
           1 2 3 4 5 6...
           2 4 6 8 10 12...
           3 6 9 12 16 20...
           4 8 12 16 20 24...
           5 10 15 20 25 30...
           ...
           then a(n) = sum of n-th antidiagonal. - Amarnath Murthy
              (amarnath_murthy(AT)yahoo.com), Apr 06 2003
=====

I was thinking a few days ago of writing a *recursive* function to create Pascal's triangle ... as an alternative example to the traditional Fibonacci's numbers. I suspect (and will have to spend some time reading!) that the link you gave may provide a lot of potential examples of recursive functions. I always found that, using
only fib(n) as an example of recursion was not very inspiring.


Andr�

_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to