Several outputs are allowed, but not infinite ones. I will try to formulate the problem in another perspective. We know there're much less than 257^1000 programs with 1000 chars or less that prints a finite set of numbers and then stops. Those that print an infinite set (and therefore never halts) must be eliminated.
For example:
Program 1 outputs {1, 3, 7} ✔
Program 2 outputs {1, 2, 3, ..., 10^1000} ✔
Program 3 outputs {1, 2, 3, 4, ...} ✖ discarted
Program 4 outputs {1, 2, ...,
up to the smallest odd perfect number} ??? how the hell can we know if it will be discarted or not?
.
.
.
last Program N outputs {8} ✔
Where N < 257^1000.
Let
R be the union between all those sets. Then,
R is finite and is not
ℕ. Therefore,
ℕ\R has a minimal element
k. The problem is: can we build an algorithm that finds
k?
For sure, we can test all programs and add new elements to
R. But if a program (like Program 4) lingers to end, how can we know if it ever will? AFAIK, that's the only part missing from the solution and I suspect there's no algorithm that fulfills this task. However, we can't say that based on the
Halting Problem.