Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Input format for sequence' topicStudent Support Forum > General > "Input format for sequence"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
09/26/12 8:50pm

Everything you did was exactly correct. You just needed one additional tiny thing. What happens with a[0]? How do you get it to stop when a[0] wants to be defined in terms of a[-1] and a[-1] in terms of a[-2] and...? You include a special case to stop it.

In[1]:= a[0]=0;
a[n_]:=7*n-a[n-1]-8;
Table[a[n],{n,0,50}]

Out[3]= {0,-1,7,6,14,13,21,20,28,27,35,34,42,41,49,48,56,55,63,62,70,69,77,76,84,83,91,90,98,97,105,104,112,111,119,118,126,125,133,132,140,139,147,146,154,153,161,160,168,167,175}

URL: ,

Subject (listing for 'Input format for sequence')
Author Date Posted
Input format for sequence Shawn Harris 09/26/12 4:11pm
Re: Input format for sequence Bill Simpson 09/26/12 8:50pm
Re: Input format for sequence yehuda ben-s... 09/27/12 10:01am
Re: Re: Input format for sequence Shawn Harris 09/27/12 1:51pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic