mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2019-02-13, 14:43   #1
davar55
 
davar55's Avatar
 
May 2004
New York City

10000100001102 Posts
Default 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 is offline   Reply With Quote
Old 2019-02-26, 13:50   #2
davar55
 
davar55's Avatar
 
May 2004
New York City

102068 Posts
Default

Has anyone tried this puzzle?
davar55 is offline   Reply With Quote
Old 2019-02-26, 15:50   #3
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

7×19×43 Posts
Default

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.
henryzz is online now   Reply With Quote
Old 2019-02-26, 17:17   #4
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

1101011111112 Posts
Default

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.
Dr Sardonicus is offline   Reply With Quote
Old 2019-02-27, 14:08   #5
davar55
 
davar55's Avatar
 
May 2004
New York City

102068 Posts
Default

Quote:
Originally Posted by henryzz View Post
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.
davar55 is offline   Reply With Quote
Old 2019-02-27, 18:51   #6
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

3·977 Posts
Default

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
ATH is offline   Reply With Quote
Old 2019-02-28, 14:03   #7
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

5·691 Posts
Default

Quote:
Originally Posted by ATH View Post
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.
Dr Sardonicus is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Digit strings containing primes davar55 Puzzles 13 2018-03-15 14:46
Silly Lucas-like sequences of primes fivemack Math 14 2017-02-05 05:44
Sequences using nine-digit pandigital numbers as start ChristianB Aliquot Sequences 16 2014-05-16 06:56
Prime-Digit Primes... petrw1 Puzzles 10 2009-12-16 21:58
listing 15-digit primes fivemack Software 8 2009-10-19 20:22

All times are UTC. The time now is 17:43.

Fri Sep 18 17:43:40 UTC 2020 up 8 days, 14:54, 1 user, load averages: 1.83, 1.52, 1.53

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.