--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
Do you mean to write a recusive function to genrate a sequence such as fibonacci:
def fib(n):
if(n==0 or n==1):
return 1
else:
return f(n-1)+fib(n-2)
Also, geometric and arithmetic sequences need not be generated recusively. How about using a list comprehesion to find the series for Xeno's Paradox:
sum([(1/2)**(n+1) for n in range(5)])
Also, geometric and arithmetic sequences need not be generated recusively. How about using a list comprehesion to find the series for Xeno's Paradox:
sum([(1/2)**(n+1) for n in range(5)])
--