Apologies for the clunky title.

Let $f: \mathbb{\mathbb{Z}^+} \to \mathbb{Z^+}$ be a function and suppose

$(\star)$ For all integers $x \geq 3$, if $f(x)$ is prime, then $x$ is prime.

A trivial example of such a function is the identity $f(x) = x$. However, a possible non-trivial example which I have come across is \begin{align*} f(x) = \left\lfloor \frac{\cosh(x\ln(2 + \sqrt{3}))}{2}\right\rfloor. \end{align*}

This function seems to satisfies $(\star)$ (see OEIS A198196). I have two questions:

- How might one go about proving $f$ satisfies $(\star)$? I'm not sure where to begin with this, and it seems like a difficult task.
- Have functions with property $(\star)$ been studied before?

Thanks for any information you can give me.

**Edits:** I've composed the floor function with $f$, and added the condition to $(\star)$ that $x$ must be an integer.

8more comments