当n是什么整数时,n^4+n^2+1是质数?

问题描述:

当n是什么整数时,n^4+n^2+1是质数?
急,用初等数论知识求解,收到请速回复谢谢!

n^4+n^2+1
=n^4+2n^2+1-n^2
=(n^2+1)^2-n^2
=(n^2+n+1)(n^2-n+1)
要使n^4+n^2+1为质数,则n^2-n+1=1且n^2+n+1是质数或n^2+n+1=1且n^2-n+1是质数
解得n=1或-1