How can blank be written on the tape if it is not part of input alphabet?
The formal definition of a turing machine is a 7-tuple $(Q, \Sigma, \Gamma, \delta, q_0, q_{\text{accept}}, q_{\text{reject}})$, where:


$Q$ is a finite set of states.
$\Sigma$ is a finite set of input symbols (input alphabet).


$\Sigma$ does not contain the blank symbol ($\sqcup$).

$\Gamma$ is a finite set of tape symbols (tape alphabet).
$\sqcup \in \Gamma$ and $ \Sigma \subseteq \Gamma$.
$\delta : Q^\prime \times \Gamma \rightarrow Q \times \Gamma \times \{L,R\} $ is the transition function.


$Q^\prime = Q - \{q_{\text{accept}}, q_{\text{reject}}\}$

$q_0 \in Q$ is the start state.
$q_{\text{accept}} \in Q$  is the accept state.
$q_{\text{reject}} \in Q$ is the reject state.


The part you want to pay attention to is the definition of the transition function:


  $\delta : Q^\prime \times \Gamma \rightarrow Q \times \Gamma \times \{L,R\} $


Note that the transition function accepts inputs that are of the tape alphabet, and writes output that is also of the tape alphabet.



The turing machine is decidable only if it recognizes some language L and and halts for every input.