mersenneforum.org Primes from digit sequences
 Register FAQ Search Today's Posts Mark Forums Read

 2019-02-13, 14:43 #1 davar55     May 2004 New York City 108616 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 6-k 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+1-k times at the appropriate space. Find the first 3 values of n for which all four numbers are simultaneously prime.
 2019-02-26, 13:50 #2 davar55     May 2004 New York City 108616 Posts Has anyone tried this puzzle?
 2019-02-26, 15:50 #3 henryzz Just call me Henry     "David" Sep 2007 Cambridge (GMT/BST) 7·19·43 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.
 2019-02-26, 17:17 #4 Dr Sardonicus     Feb 2017 Nowhere 5·691 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.
2019-02-27, 14:08   #5
davar55

May 2004
New York City

2×32×5×47 Posts

Quote:
 Originally Posted by henryzz 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.
All numbers are intended to be decimal (base-10) with no lead zeroes.
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.

 2019-02-27, 18:51 #6 ATH Einyen     Dec 2003 Denmark 3×977 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 2019-02-27 at 18:52
2019-02-28, 14:03   #7
Dr Sardonicus

Feb 2017
Nowhere

5·691 Posts

Quote:
 Originally Posted by ATH You only need to check n=1,3,7,9 (mod 10).
Yes! Also assuming a base-ten formulation...

Thanks to being old enough to be familiar with "digital roots" and "casting out nines," [in more modern parlance, the fact that non-negative 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.

 Similar Threads Thread Thread Starter Forum Replies Last Post davar55 Puzzles 13 2018-03-15 14:46 fivemack Math 14 2017-02-05 05:44 ChristianB Aliquot Sequences 16 2014-05-16 06:56 petrw1 Puzzles 10 2009-12-16 21:58 fivemack Software 8 2009-10-19 20:22

All times are UTC. The time now is 16:38.

Fri Sep 18 16:38:09 UTC 2020 up 8 days, 13:49, 1 user, load averages: 1.49, 1.83, 1.94