0
$\begingroup$

This question already has an answer here:

I would like to calculate the following sum

Sum[0^(k-a), {k, 0, Nin}]

for a positive integer $a$.

With considering $0^0=1$, my expected answer of the sum is $1$, which is obtained for $k=a$, while ignoring the other terms for $k\neq a$.

Can this be made in Mathematica somehow?

$\endgroup$

marked as duplicate by mikado, Henrik Schumacher, m_goldberg, Bob Hanlon, MikeLimaOscar Jun 17 at 11:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Mathematica considers 0^0 to be indeterminate. $\endgroup$ – bill s Jun 14 at 13:33
  • 1
    $\begingroup$ Since you want to arbitrarily equate the sum to 1 just use Sum[0^(k - a), {k, 0, Nin}] /. _ -> 1 $\endgroup$ – Bob Hanlon Jun 14 at 13:41
  • 1
    $\begingroup$ 0^-1 is ComplexInfinity. $\endgroup$ – user64494 Jun 14 at 14:08
  • $\begingroup$ See mathematica.stackexchange.com/a/64180/30083. $\endgroup$ – user76284 Jun 15 at 2:41
1
$\begingroup$

Use KroneckerDelta[n] or DiscreteDelta[n] instead of 0^n.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.