I am reading article about pseudorandomness of primes and there is a part that I don't understand. Based on Cramer model(without even numbers) the number of twin primes in $[1,..,N]$ is ~ $2\frac{N}{log^2(N)}$.
Then in general, assume that all numbers n divisible by some prime less than a small threshold w are prime with probability zero, and are prime with a probability of $\Pi_{p<w} (1-\frac{1}{p})^{-1} \frac{1}{logN}$ otherwise.
Then the number of twin primes ~ $2 \Pi_{p<w} (1-\frac{1}{p^2}) \frac{N}{log^2N}$, and if $w \to \infty$ then we got $\Pi_{2} \frac{N}{log^2N}$, where $\Pi_{2}=2 \Pi_{p \geq 3} (1-\frac{1}{(p-1)^2})$.
I wonder how we get $(1-\frac{1}{p^2})$ in this prediction and $(1-\frac{1}{(p-1)^2})$ in twin prime constant? I know this is Euler product formula but I cannot figure out the right calculations. Thanks in advance for help!