If we take a complex projective variety $X$ and blow it up at a point, we get an exceptional divisor $E\cong \mathbb{P}^{n-1}$, where $n=dim(X)$.
My question basically regards $\mathcal{O}_{\tilde X}(E)$ or to be more precise $\mathcal{O}_{\tilde X}(E)|_E$. This will be a line bundle on $E$ and I think it should be just $\mathcal{O}_E(-(n-1))$.
The question is, how can I see this claim? We can consider e.g. the simple case of the blow up of $\mathbb{P}^2$, which looks like this $\{[a:b:c],[x:y]|ay-bx=0\}\subset \mathbb{P}^2\times\mathbb{P}^1$. Then $E$ will be of the form $E=\{a=b=0\}\subset X$.
My attempt: I tried to represent the divisor $E$ by a line bundle through choosing a covering and then calculating coycles for that covering (which was just the product of the standard affine coverings). If needed I can elaborate on this, but the cocycles that I got gave me the trivial bundle as restriction on $E$, which is not what I should get, but rather the tautological bundle!
How do I actually end up with the tautological bundle?