20190213, 14:43  #1 
May 2004
New York City
4232_{10} Posts 
Primes from digit sequences
Consider the four numbers
111112222333445, 122333444455555, 544333222211111, and 555554444333221. These are constructed out of the first n=five digits, in increasing or decreasing order, each digit k repeated either k or 6k times, to form these four decimal patterns. The same four patterns can be formed for any positive integral number n, where for k >= 10 all the digits in k are included k or n+1k times at the appropriate space. Find the first 3 values of n for which all four numbers are simultaneously prime. 
20190226, 13:50  #2 
May 2004
New York City
2^{3}·23^{2} Posts 
Has anyone tried this puzzle?

20190226, 15:50  #3 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
16BE_{16} Posts 
I am not clear on how you intend to represent n>=10. Could you provide an example?
One approach would be to generate base n+1 numbers. 
20190226, 17:17  #4 
Feb 2017
Nowhere
1000011111000_{2} Posts 
The problem wasn't clearly stated enough for me to give it serious attention. For the digits 1 to 9, it could be in base ten, but (as already pointed out), treating the integers 1 to n as digits, the problem could be stated in base n+1 (or, I would add, in any larger base).
Assuming that for the digits 1 to 9 the problems are stated in base ten, the only terminal digits allowing either number formed as indicated to be prime, are 1, 3, 7, and 9. Neither 1 and 11111 are prime. That's where I left it. 
20190227, 14:08  #5  
May 2004
New York City
2^{3}×23^{2} Posts 
Quote:
Thus for n=12 one of the numbers is: 121212121212121212121212111111111111111111111110101010101010101010999999999888888887777777666666555554444333221. However, n=12 (or any even number) is not a solution because some of the four numbers must end in an even digit and thus not be prime. 

20190227, 18:51  #6 
Einyen
Dec 2003
Denmark
3,037 Posts 
You only need to check n=1,3,7,9 (mod 10).
It is extremely unlikely there are any n with all 4 primes, they grow very quickly. I tested up to n=289 and the smallest of the 4 numbers is already 99,390 digits. Even testing all n's and testing all 4 numbers each time, the only primes up to n=166 (max 36,588 digits) is: 211 322111 4332221111 Last fiddled with by ATH on 20190227 at 18:52 
20190228, 14:03  #7 
Feb 2017
Nowhere
2^{3}×3×181 Posts 
Yes! Also assuming a baseten formulation...
Thanks to being old enough to be familiar with "digital roots" and "casting out nines," [in more modern parlance, the fact that nonnegative integer powers of ten are congruent to 1 (mod 9)], I realized that it is easy to determine remainders (mod 3). The result is: You also need only consider n == 1, 2, 3, 5, or 6 (mod 9). For the congruence classes n == 0, 4, 7,or 8 (mod 9), at least two of the four numbers are divisible by 3. For other primes, figuring the correct powers of ten gets to be a real pain in the patootie. I note that the problem can be formulated unambiguously in base n+1, in which the integers 1 to n can legitimately be considered to be "digits." In this formulation, there's no problem with what powers of n+1 to use. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Digit strings containing primes  davar55  Puzzles  13  20180315 14:46 
Silly Lucaslike sequences of primes  fivemack  Math  14  20170205 05:44 
Sequences using ninedigit pandigital numbers as start  ChristianB  Aliquot Sequences  16  20140516 06:56 
PrimeDigit Primes...  petrw1  Puzzles  10  20091216 21:58 
listing 15digit primes  fivemack  Software  8  20091019 20:22 