Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'how to write recurrence function' topicStudent Support Forum > General > "how to write recurrence function"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/27/12 12:38pm

Is this what you are looking for?

In[1]:= f[1]=x1;
f[n_]:=f[n-1]*Plus@@Table[ToExpression["x"<>ToString[i]],{i,1,n}]

In[3]:= f[1]
Out[3]= x1

In[4]:= f[2]
Out[4]= x1 (x1+x2)

In[5]:= f[3]
Out[5]= x1 (x1+x2) (x1+x2+x3)

URL: ,

Subject (listing for 'how to write recurrence function')
Author Date Posted
how to write recurrence function student 09/25/12 5:16pm
Re: how to write recurrence function Bill Simpson 09/27/12 12:38pm
< Previous CommentHelp | Reply To Comment | Reply To Topic