Suppose I am interested in a sum across a set of even numbers, such as:
Sum[x, {x, 2, 20, 2}] 110
or
Sum[ x Boole[EvenQ[x]], {x, 1, 20}] 110
So far, so good.
HOWEVER, if I extend this to an infinite set, the first method works:
Sum[ (x/x!), {x, 2, Infinity, 2}] Sinh[1]
... but the Boole method returns 0:
Sum[ (x/x!) Boole[EvenQ[x]], {x, 1, Infinity}] 0
My interest in this comes from a question on the mathSE site:
where someone asks how to calculate the probability of a Poisson random variable being prime, and I was actually trying the same type of problem with PrimeQ ... and also getting 0. I wasn't expecting mma to get an answer ... but 0 is wrong. Any ideas?
Sum[x/x!, {x, 2, Infinity, 2}]. Search this site and you'll find a few examples of more complicated cases that cant readily be treated like that and unfortunately there is no general solution. $\endgroup$Sum[x/x!, {x, 2, Infinity, 2}]has always been part of the question. Maybe you missed it? $\endgroup$