How to write Latex indicator function ?

Latex indicator function

We use package amsfonts In preamble, we have

\usepackage{amsfonts}

and the command \mathbb

$\mathbb{1}$ is the indicator function

$\mathbb{1}$ is the indicator function