I have one list a of length (n+1):
a={a[0],a[1],...,a[n]}
I wish to build a list by applying a function f, a recursive non-linear function, that depends on the value of a at both indexes i and (i-1) and on the previous value of the "under construction" list. The first value of list b is defined as b0. Here is the list I would like to get:
b={b0,f(b0,a[0],a[1]),...,f(b[n-1],a[n-1],a[n]))}
The first and last element of list a won't change but I want to test several values of incrementation, therefore n (the length of vector a) will change.
I have tried using Table, Array, combining it with Module and I managed to call at least one specific value by its index from list a but I can't find a way to do the multiple manipulations as described above.
a[i]
numbers? Does the functionf
return a number? Or the same type of object asa[i]
? $\endgroup$