In proving that there are infinitely many primes, one could define a function $\displaystyle f: \mathbb{N} \to \mathbb{N} $ by $\displaystyle f(n) = n!+1 $ and show that(1)$\displaystyle f(n) > n $ for all $\displaystyle n \in \mathbb{N} $,(2)$\displaystyle f(n) $ is either prime or composite and(3)$\displaystyle f(n) $ has prime factors greater than $\displaystyle n $ if $\displaystyle f(n) $ is composite.

So in general can we find a function $\displaystyle f: \mathbb{N} \to \mathbb{N} $ defined by $\displaystyle f(n) = n! + a $ and choose $\displaystyle a $ accordingly to satisfy the above conditions? Could we define a function $\displaystyle f: \mathbb{N} \to \mathbb{N} $ in another way that satisfies the above condtions?