mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   Primes from digit sequences (https://www.mersenneforum.org/showthread.php?t=24079)

davar55 2019-02-13 14:43

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.

davar55 2019-02-26 13:50

Has anyone tried this puzzle?

henryzz 2019-02-26 15:50

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.

Dr Sardonicus 2019-02-26 17:17

The problem wasn't clearly stated enough for me to give it serious attention. For the digits 1 to 9, it [i]could[/i] 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.

davar55 2019-02-27 14:08

[QUOTE=henryzz;509509]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.[/QUOTE]

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.

ATH 2019-02-27 18:51

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

Dr Sardonicus 2019-02-28 14:03

[QUOTE=ATH;509618]You only need to check n=1,3,7,9 (mod 10).[/QUOTE]
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.


All times are UTC. The time now is 03:42.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.