# Even/odd indicator function

1. Jun 26, 2011

### bruno67

Is there a convenient shorthand for an "indicator function" of a positive integer n which vanishes if n is odd and is equal to 1 otherwise? I was thinking about something like

$$\mathbb{1}_{\{\mathrm{mod}(n,2)=0\}}(n),$$
but I'm not sure if this would be considered acceptable mathematical notation.

2. Jun 26, 2011

### HallsofIvy

Staff Emeritus
$$\frac{(-1)^n+ 1}{2}$$

3. Jun 26, 2011

### tiny-tim

(1 + (-1)n)/2 ?

δ(sin(nπ)) ?

4. Jun 26, 2011

Thanks!