Message Boards Message Boards

2 Replies
4 Total Likes
View groups...
Share this post:

Double nesting a function?

Posted 11 years ago
I need to write a function of 4 variables [p,x,n,H] that outputs a list of the following list elements:

As you can see, each output contains all previous outputs, but not in the traditional "NestList" way. I'm trying to write a function that describes the above. I've tried NestList, FoldList, and Module to no avail.
POSTED BY: Bryan Lettner
2 Replies
Posted 11 years ago
Thanks Ilian.  Works well
POSTED BY: Bryan Lettner
Perhaps something like
 In[1]:= a[k_] := Floor[(p * x)/n^(H - k) - Sum[n^(k - j) a[j], {j, 0, k - 1}]]
 In[2]:= a[0]
 Out[2]= Floor[n^-H p x]
 In[3]:= a[1]
 Out[3]= Floor[n^(1 - H) p x - n Floor[n^-H p x]]
POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract