# Math object that returns 0 at k=0, 1 at k>0?

1. Oct 13, 2012

### DocZaius

Hello,

I'm using summation notation (from k=0 to n) and would like a mathematical object to:

return 0 when k=0
return 1 when k>0

I messed around with binomial coefficients but couldn't make it work. It's probably trivial, but I couldn't find it after much googling.

Last edited: Oct 13, 2012
2. Oct 13, 2012

### haruspex

You could use a Green's function, or a Kronecker delta, but these are nonstandard functions. No smooth function will do what you want. Why do you need it?

3. Oct 13, 2012

### DocZaius

Definitely don't need anything smooth. I am trying to write out integration by parts to the nth derivative of the function g, and I am trying to sum up the boundary terms that pop out of higher n's. I want to be general enough to allow for n=0, which would mean there is no boundary terms and would need the sum to be killed off. Is there a simpler way to do it than:

kroenecker_delta(0,kroenecker_delta(k,0))

4. Oct 13, 2012

### haruspex

I was thinking of 1-kroenecker_delta(k,0)

5. Oct 14, 2012