I have two lists, for example (the real lists are much longer):
list1 = {1, 2, 3, 4, 5, 6, 7};
list2 = {9, 10, 11, 12, 13, 14, 15};
I want to create a single list by adding together different elements from different places in each list. For example,
list3 = (list1i+1 + list1i-1) * (list2i+1 + list2i-1)
where $i$ is the location of the number in the list, e.g. in list2
, 12 would be $i=4$. I realize the first and last entries in list3
would either be wrong or non-existent. For example, the 2nd item in list3
would be $(3+1)(11+9)$ and the 3rd item would be $(4+2)(12+10)$.
I hope that makes sense and I appreciate any help.