axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-mail] sum()


From: Marcus Better
Subject: [Axiom-mail] sum()
Date: Mon, 21 Jun 2004 22:05:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Hi all,

I am trying to define a simple recursive function, but axiom refuses to obey me. I would like to do something like this:

  f: Integer -> Integer;
  f(0)==1; f(1)==2;
  f(n)==sum(f(i)*f(n-i), i=0..(n-1))

which gives me "Cannot convert from type Variable i to Integer for value i". I have also tried other variants.

Thanks,

Marcus

-----------------------------------------------------------------
Marcus Better
Department of Mathematics                      Tel. +46 8 164539
Stockholm University                           Fax +46 8 6126717
SE-106 91 Stockholm
Sweden                                     http://www.math.su.se
-----------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]