5
$\begingroup$

A Wednesday number is a number $N$ where any two consecutive digits make a prime, and all such primes formed are distinct

For example, $1371$ is a Wednesday number because $13$, $37$ and $71$ are all distinct primes.

Find the largest Wedenesday number.

$\endgroup$
2
  • $\begingroup$ Largest in regard to the number of used distinct primes or largest in regard to the numerical value of the found wednesday number? $\endgroup$
    – Aron_dc
    Commented Oct 1, 2015 at 6:43
  • $\begingroup$ @Aron_dc Largest in regard to the final number. Ofcourse, this directly depends on the number of distinct primes used $\endgroup$ Commented Oct 1, 2015 at 15:13

3 Answers 3

16
$\begingroup$

619737131179

61,19,97,73,37,71,13,31,11,17,79 are distinct primes

First we limit the number of digits, there are only 21 2 digit primes, namely

11   13   17   19   23   29   31   37   41   43   47    
53   59   61   67   71   73   79   83   89   97

Note that, since no prime ends in 0,2,4,6,8,5, we can only have those digits at the start, Therefore, except the leftmost prime all other must consist of the digits 1,3,7,9. There are 10 such primes.

11   13   17   19   31   37   71   73   79  97

Since a digit is used twice (as the first digit and as the last), it follows that there can be at most 10 primes (hence 11 digits) except the first. So, there can be a total of 12 digits, the leftmost from 0,2,4,5,6,8, the others from 1,3,7,9.

First let us ignore the leftmost digits and make a 11 digit Wednesday number from 1,3,7,9. Note that, in the primes

11   13   17   19   31   37   71   73   79  97

1 is used four times at the tens digit, three times as the unit digit. Therefore it must be at the beginning, similarly 9 at the end. The best we can do this way is $19737131179$. Now we can append a 6 to the beginning and get the desired result. (note that we can't append 8 since 81 is not a prime).

$\endgroup$
2
  • $\begingroup$ Is there a chance that you chose a prime bigger than 19 to be the first prime in your number and still be able to use the 10 primes? The resulting number should be a bigger wednesday number wouldn't it? $\endgroup$
    – Aron_dc
    Commented Oct 1, 2015 at 6:45
  • 3
    $\begingroup$ He already proved (indirectly) that 19 should be in front to get the largest number by saying "1 is used four times at the tens digit, three times as the unit digit. Therefore it must be at the beginning". Since the first digit must be 1, the largest first two digits (before prepending 6) must be 19, which is exemplified here. $\endgroup$
    – justhalf
    Commented Oct 1, 2015 at 7:43
4
$\begingroup$

My attempt:

8973713119

With the primes:

89  97  73  37  71  13  31  11  19  
$\endgroup$
4
  • $\begingroup$ Good try. @Anachor has found the greatest one, though. You can try my other question, puzzling.stackexchange.com/questions/22730/… $\endgroup$ Commented Sep 30, 2015 at 7:54
  • $\begingroup$ Is this your first answer on SE? $\endgroup$ Commented Sep 30, 2015 at 7:54
  • $\begingroup$ Yes first answer. I've been looking around the site for a few weeks though $\endgroup$ Commented Sep 30, 2015 at 7:56
  • 1
    $\begingroup$ I don't understand why this has a down-vote, It was the first answer and a good attempt. $\endgroup$
    – Rohcana
    Commented Sep 30, 2015 at 8:58
2
$\begingroup$

My attempt:

$619737131179$

Each 2 consecutive digits should make a prime number, so we can only use these prime numbers:

11     13     17     19     
23     29 
31     37     
41     43     47     
53     59     
61     67     
71     73     79     
83     89     
97

We can only use primes that consist out of $1$, $3$, $7$ and/or $9$, because only with this primes we can continue the row or primes. The reason to only use primes of these numbers is because a prime number never(except for $2$ and $5$) ends on an even number or $5$, so if a prime starts with it, it must be the very first one. That means that we only have 10 numbers:

11     13     17     19
31     37
71     73     79
97

And we have to make the longest(not largest!!!) possible number out of it.
That is: $19737131179$, which uses all 10 primes(and is therefore 11 digits long).

Now we only need to find the biggest prime number that ends with a $1$ and starts with an even number or $5$. And that is %61%, so the answer is:

$619737131179$

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.