Associated Topics || Dr. Math Home || Search Dr. Math

### Primes Containing but Not Ending in 123456789

```Date: 02/26/2003 at 20:35:12
From: Marie
Subject: Prime numbers

Are there infinitely many primes that contain but do not end in the
block of digits 123456789 ?

I could do the problem if it asked me to show infinitely many primes
that end in this block, because I would use Dirichlet's theorem.  But
I am unsure of how to represent the block in  any position.
```

```
Date: 02/27/2003 at 02:48:42
From: Doctor Jacques
Subject: Re: Prime numbers

Hi Marie,

I understand that you want to use Dirichlet's theorem with your
progression:

10^11 k + 1234567891

This progression contains infinitely many primes, and all these primes
contain the string 123456789.

So, you _did_ prove the theorem, and, with an obvious generalization,
you could prove even more:

There are infinitely many primes that contain the string 123456789
in any pre-assigned position. This is also true for other strings,
except that you cannot have infinitely many primes ending in 5 or an
even number (Dirichlet's theorem would not apply in this case).

You said you could solve the problem with the string in the units
position. Let us try to prove the theorem in the same way with the
string 3 positions to the left (i.e. with the 9 in the thousands
position).

We want to show that there are infinitely many primes in the form:

...xxxxx123456789yyy

As there are no constraints on the xxx and yyy, we are free to choose
yyy - this will prove more than what is required.

Pick for example, yyy = 537.

Our problem is now reduced to proving that there are infinitely many
primes ending in:

123456789537

and Dirichlet's theorem can be used in an obvious way, with the
progression:

n*(10^12) + 123456789537

All those (inifinitely many) primes contain 1234565789 in a position
other than the last, so they witness the exactitude of the theorem.

You do not need to have a general formula for the string in any
position - you can pick any string yyy (that does not end in 5 or
an event number), and append it to the right of the given string.

Does this make sense? Write back if you want to discuss this
further.

- Doctor Jacques, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search