# Question on Concatenation of Prime Numbers

## Concatenation

Concatenation of two numbers $(p,q)$ in some number base is defined as combining the digits of those numbers, written as $p||q$ .

For example, $123||456=123456$.

Concatenation simply combines digits of two numbers.

## Concatenator

Let $p,q$ be prime numbers.

If the result of $p||q$ is a composite number, I call it the Concatenator of $p,q$.

If the result is a new prime number, then pair $(p,q)$ does not have a Concatenator.

Always a Concatenator?

From this you can see that all pairs of form $(p,2)$ and $(q,5)$ always have a Concatenator, since the result is divisible by $2$ for the first case and by $5$ for the second case.

Also, if $(|p-q|=2)$ and the smaller prime is $\gt3$, then the pair $(p,q)$ always has a Concatenator since the result is always divisible by $3$. These pairs are twin primes.

If $p=q$ then those pairs are also always a Concatenator of course.

Perfect Concatenators

I also wanted to mention that some pairs share the same Concatenator. If a pair $p,q$ has a unique Concatenator, then I call it the Perfect Concatenator.

Example: $37193$ is not a perfect one, since pairs $(3719,3)$ and $(37,193)$ and $(3,7193)$ all share it.

Example: Trivially perfect pairs are pairs where both $p$ and $q$ are one digit primes.

## Delayed Concatenator

Furthermore, if a pair does not have a Concatenator, we can multiply $p$ by $10$ before the concatenation, and check if the result is composite. If it is, the pair is a Delayed-$1$ Concatenator.

If the result is still not a Concatenator, multiply by $10$ again and repeat until you get a Concatenator. If you multiplied by $10^n$ in total, then the result is a Delayed-$n$ Concatenator.

What is the most delayed concatenator?

Below are the smallest most delayed concatenators I've found so far for $p=2,3,5,7,11,13$

203, 20083, 200011, 200004133, 20000029, (5)

3013, 3007, 300011, 300002411, 30000089, (5)

5041, 500101, 50003, 500002237, 50000020063, (5)

703, 70043, 700019, 700002551, (4)

1107, 110071, 110003, 1100005879, (4)

13011, 130037, 130007, 130000307, 1300000457, (5)


Below are the smallest most delayed concatenators I've found so far for $q=2,3,5,7,11,13$

[doesn't exist]

203, 29003, 50003, 27100003, 5527000003, (5)

[doesn't exist]

1107, 3007, 130007, 103300007, 1069000007, 76810000007 (6)

13011, 230011, 200011, 857000011, 14990000011 (5)

3013, 190013, 15100013, 43000013, 4870000013 (5)


Where you see that the best I could find was a delayed $6$ concatenator.

The smallest $\text{D}6$ concatenator so far is $76810000007$.

This means $7681000007,768100007,76810007,7681007,768107,76817$ are all prime.

This is the result of concatenation of $(7681,7)$ by delaying it by $10^6$.

But the real smallest $\text{D}6$ would be of form $2000000||q$, if such $q$ exists.

Questions

• Can you find a more delayed concatenator?
Is there such a thing as the most-delayed-concatenator?
• Can a more delayed concatenator be computed/calculated without brute force search?
Is it possible to define a more efficient algorithm?

• Is there anything similar to this already analyzed somewhere?

• Are there any more trivial pairs $(p,q)$ such that they always have a concatenator, other than ones with $p=2,5$ and twin primes?

Asking if there is a delayed $n$ concatenator for some $(p,q)$ is like asking if there exists a sequence of prime numbers of length $n$ of form $$p||\underbrace{0\dots0}_k||q$$ for $k=0,1,2\dots n-1$.

• I haven't ran any searches yet, but I have a hunch the OEIS covers this in excruciating detail. – Mr. Brooks Jun 20 '17 at 21:51
• @Mr.Brooks The only relevant sequence I found is the sequence of Concatenators: A121609, but I haven't found anything that is similar to delayed concatenators. – Vepir Jun 21 '17 at 9:38
• Well, maybe that's something that needs to be added to the OEIS. I've thought of several sequences but I look them up and I find they're already in the OEIS. – Mr. Brooks Jun 23 '17 at 19:51
• is there an easy (read: algorithmically fast) way to tell if a pair $(p,q)$ does not have a concatenator? – Tommy Aug 31 '17 at 15:51
• @Tommy None that I'm aware of. – Vepir Sep 1 '17 at 9:42

Note that $1,10,10^2,10^3,10^4$ and $10^5$ all have different remainders mod $7$. Thus, if neither $p$ nor $q$ is $7$, one of $p\|q,10p\|q,...,10^5p\|q$ is a multiple of $7$. So you can't get a delay of more than $5$ unless one of the primes is $7$.
• And similarly for $17$, so you can never get a delay of more than $15$. – Robert Israel Jun 19 '17 at 15:31
• $90293$ is divisible by $7$, so that's a mistake. – Robert Israel Jun 19 '17 at 15:32