How can we turn any number (where the number is > 2) into a prime number by simply appending more digits? I'm referring to the right side of the number.

So

4 is not a prime number

But If I append 1 or 3 or 7 it can become a prime number

4**1**, 4**3**, 4**7** are all in fact prime numbers

I "know" this is possible (however I don't have a proof for that) simply because of "density" of prime numbers, so given any number I can simply add many "5" digits and then starting searching prime numbers by adding "1" to the resulting number and test it for primality.

However is there any smarter way to do that without using "bruteforce" (i.e. testing for primality a range of values )

Out of the box solutions are preferred, in example.

if the number is in the form XYZ then XYZ(ZYX+1) is prime.