Let $\mathit I $$\,$ be the ideal of $\mathbb Z[x] $ generated by $\mathit x^2+1$ and $ 3x+1$. Find the positive integer $\mathit n$ such that $\mathit I$ $\cap \mathbb Z$ = $\mathit n$$\mathbb Z$
I find $(\mathit x^2+1)(9)+ (3x+1)(-3x+1)= 10 $, So It is expected that 'n =10' But I can't find for n=1, 2, 5
Any hint will be appreciated.