Question on the definition of computable function and non-terminating behaviour
The short answer is that: this part of Wikipedia's explanation kinda sucks.  Hey, it happens.  Wikipedia is pretty good, but it's not perfect.

The relevant part of the Wikipedia article says:


  Equivalently, computable functions can be formalized as functions which can be calculated by an idealized computing agent such as a Turing machine or a register machine. Formally speaking, a partial function $f : \mathbb{N}^k \to \mathbb{N}$ can be calculated if and only if there exists a computer program with the following properties:
  
  
  If $f(x)$ is defined, then the program will terminate on the input $x$ with the value $f(x)$ stored in the computer memory.
  If $f(x)$ is undefined, then the program never terminates on the input $x$.
  


The second sentence is not strictly wrong (that sentence does say that "a partial function can be calculated if...") but it sure seems misleading to include that sentence in an article on computable functions, as computable functions are required to be total functions.  Also, the combination of those two sentences leaves the wrong impression as it omits the requirement that $f$ be a total function.

Advice: if you're reading something in Wikipedia that seems confusing or doesn't seem quite right, check another source.  Check a good textbook -- they are a more definitive source for the precise definition of mathematical concepts.