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.
