I'm reading book "Math for Computer Science by Lehman, page 5", where I stumbled in this statement (below)
For all non-negative numbers $n^2+n+41$ is prime.
$p(n)::=n^2+n+41$
$p(1)=43$, $p(2)=47$, $p(3)=53$, ..., $p(40)=41\times41$(not prime)
Then $n^2+n+41$ is prime is false.
$\forall n \in \mathbb{N}$. $p(n)$ is prime. So this is the part, which I don't understand. For all $n$ of natural numbers, $p(n)$ is prime. How this could be true if we prove before that is not true ($p(40)=41\times41$(not prime))?
Yes, it is false. The author proved it in page 5. Afterwards, in order to introduce the formalism of quantifiers, he wrote down the aforementioned false statement as it should be written in that formalism. Of course, a specific method to write sentences isn't restricted only to sentences the content of which can be proved to be true under some assumptions. Had he specifically wanted to write a true statement, he might have written $$\exists n,\ \neg (p(n)\text{ prime})$$ or $$\exists n,\ \exists k,\exists h,\ (n^2+n+41\mid kh)\wedge (\neg(n^2+n+41\mid k)\vee \neg(n^2+n+41\mid h))$$