0

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?

user64494
  • 26,149
  • 4
  • 27
  • 56
Veteran
  • 439
  • 2
  • 7

1 Answers1

1

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

Somos
  • 4,897
  • 1
  • 9
  • 15