I want to evaluate the code below for a series of s, running s from for example 1 to 100, or with s being a list of specific numbers in a list such as {5,7,10, etc}. The result for each evaluation, thus for each individual s in the series, should be exported into a separate column in a csv file. In the attached notebook, as you see, I have set s to 5, thus exporting the resulting cosine projected 5000 steps into a single column csv. So far I have found the command Do: Do[sums, {s, list}] or Do[sums, {s, 100}], but then I have trouble incorporating the successive export for each s calculated.
The code/setup (also attached as a notebook file "test loop atco"): 
Any input appreciated! //Mike
Attachments: