$\forall f: \mathbb{N} \to \mathbb{N}$ primitive recursive function, whose most values are equal to $0$, in general can there be algorithmically found a number $N$ such that $(\forall i > N)\,\,f(i)=0$?
With "most of values" is meant that $\sum_{i=0}^\infty {f(i)}$ is finite. I think that such an $N$ cannot be found if we aren't considering some special case, because no matter for how many values of $i$ you check, you never know if $f(i+1)=0$ or not. This in the general case, but I'm not sure how this can be proven. It looks like the halting problem in some sense, but I'm not sure how to find a real connection between them.
This is not a problem from a textbook, but an intuition of mine, while trying to solve this: Show that infinite sum/product of primitive recursive functions can be non-recursive.. I decided to ask this separately to isolate it from the main question.
Am I right that such an $N$ cannot be found for the general case?
UPDATE Here is what I have just tried. Could you verify if its a valid solution?
Consider a Turing machine which should halt when run on input $y$. Consider the primitive recursive function $\xi(n)$ which is equivalent to the Godel number of $n+1$ $1$s. Consider the primitive recursive function $H(t)$ that returns the Godel number of the sequence of all symbols on the Turing machine on moment $t$. If the Turing machine has halted, then it keeps returning the same value. And finally consider the function $h(t) = sg|H(t)-\xi(y)|$. Then according to our supposition $\exists N_1$ such that $\forall t > N_1 \implies h(t)=0$, in other words, the output does not change anymore, which means that we have solved the Halting problem which is not possible.
The primitive recursiveness of $\xi$ can be easily shown. $H(t)$ is a Godel number which is generated from the function that is computed by the Turing machine, so it is primitive recursive.