Re: help!
mathworker said:
but given function is not constant and i checked y =f(X) for some numbers and found it prime every time
$$3\cdot 5^2 + 3\cdot 5 + 1 = 91 = 7\cdot 13$$ this is the smallest non-prime value.
Nonconstant polynomials can't be forever prime, indeed suppose $$f(x)=a_n\cdot x^n +\ldots + a_1\cdot x^1 + a_0$$
Then imagine it were always prime, and then $$f(x)-f(y)=a_n\cdot (x^n-y^n)+\ldots + a_1\cdot (x-y)$$ right?
Well, clearly $$x-y$$ divides $$x^n-y^n=(x-y)\cdot \left(x^{n-1}+x^{n-2}y+\ldots +x y^{n-2}+y^{n-1}\right)$$ for each $$n$$, and so $$(x-y)|(f(x)-f(y))$$
Thus if $$p$$ were a prime dividing $$f(r)$$ for some $$r\geq 1$$, we have $$\left( (k\cdot p + r) - r\right) | \left( f(k\cdot p + r) - f(r) \right)$$ for each $$k$$ and so, since $$p|f(r)$$, it follows that $$p | f(p\cdot k+r)$$ for each $$k\geq 1$$.
But $$f(p\cdot k+r)$$ for $$k\geq 1$$ can't all equal $$p$$, since $$f$$ would otherwise have to be constant. Hence some $$f(k\cdot p + r)$$ must be composite.
So with this construction in mind we could note that $$f(1)=7$$, and so $$f(7\cdot k + 1)$$ is nonprime for some $$k\geq 1$$, check for instance $$f(8)=217$$ which, as we saw, must be a multiple of $$7$$.