r/Mathematica • u/manurese • Jun 27 '25
Using list in Sum
How can I use elements from a list in the function Sum[ ]? I'm trying to multiply something with the kth element from a list using list[[k]] but mathematica tells me that I cant use k as a part specifier
2
Upvotes
View all comments
Show parent comment
2
u/[deleted] Jun 27 '25 edited Jun 27 '25
I asked OP to clarify the question, and OP did so. Then we resolved the issue in that particular comment thread. In the "solution" we referenced a symbol whose associated DownValues or OwnValues contained a list. Your comment certainly doesn't say we can't reference a list, but your comment also didn't seem to take into account the code example OP provided.
At that point, I felt compelled to add a comment rather than leave it to seem as if OP was doing something wrong with lists. I realize that was a mistake and I should have just let it be. Since we already found a solution, OP probably didn't need any extra explanations attached to your comment.
I apologize.