TransWikia.com

Summation over elements

Mathematica Asked by Madhurima Chakraborty on May 4, 2021

I want to write a sum over "i" whose limits are like "i" starting 1 to 10 but "i" not equal to 2. How to write this?

2 Answers

Sum[m+17, {m, Range[10] /. 2 -> Nothing}]

Answered by PaulCommentary on May 4, 2021

f /@ Cases[Except[2]]@Range[10] // Total


Sum[f[i]*Boole[i != 2], {i,10}]

Answered by cvgmt on May 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP