Show this function is partially computable
Since $B$ is a computable predicate, there is one procedure that computes it. We can call this procedure in any point of our program.

K &lt;- k
i &lt;- 0
LOOP
    RESULT &lt;- B(i)
    IF RESULT != 0 GOTO TRUE
        GOTO ELSE
        TRUE
        K&lt;-K-1
    ELSE
    IF K != 0 GOTO KEEP_GOING
        GOTO BREAK
    KEEP_GOING
    i &lt;- i+1
GOTO LOOP

BREAK
RETURN 1


You will need to substitute the instruction K &lt;- K-1 by an appropriate procedure.

To understand what is going on, we are looping through every natural number and checking whether it satisfies the predicate $B$, keeping a counter that diminishes every time we find one such number. So when the counter K reaches zero we know that the function should return 1, and we proceed to do exactly that.