Spektrum problem: Beetroot and Radish primes

If one cuts a beetroot, each piece is just a red as the whole. By a radish by contrast, only the external layer is red, and the cross-sections are all white. This motivates the following definitions of subclasses of primes:

Definition 1. A prime number n = d N 1 d 2 d 1 d 0 P n=d_{N-1}\ldots d_{2}d_{1}d_{0}\in\mathbb{P} written to basis ten \text{ten} shall be called called a Beetroot just in case every connected non-trivial subsequence of the digits is in P { 1 } \mathbb{P}\cup\{1\} . For example , 137 137 is a Beetroot, as 137 P 137\in\mathbb{P} (red layer) and 1 , 3 , 7 , 13 , 17 P { 1 } 1,3,7,13,17\in\mathbb{P}\cup\{1\} (all red layers).

Beetroot Beetroot

Definition 2. A prime number n = d N 1 d 2 d 1 d 0 P n=d_{N-1}\ldots d_{2}d_{1}d_{0}\in\mathbb{P} written to basis ten \text{ten} shall be called called a Radish just in case (1) it is of length > 1 >1 and (2) NO connected non-trivial subsequence of the digits is in P { 1 } \mathbb{P}\cup\{1\} . For example , 60649 60649 is a Radish, as 60649 P 60649\in\mathbb{P} (red layer) and 6 , 0 , 6 , 4 , 9 , 60 , 64 , 49 , 606 , 649 , 6064 P { 1 } 6,0,6,4,9,60,64,49,606,649,6064\notin\mathbb{P}\cup\{1\} (all white layers).

Radish Radish

Task. Determine the largest Beetroot-prime, b b , and the smallest Radish-prime, s s . Write these to basis 10 10 and concatenate the digits. Eg suppose you think b = 357 b=357 and s = 52340 s=52340 , then input your answer as 35752340 35752340 . (Note: These are clearly not the answers, they are not even Beetroots/Radishes.)

Ideally, develop an algorithm to generate Beetroots and Radishes.


Original Author: Willi Botta, source Spektrum , accessed 29.05.2018.


The answer is 313789.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

R Mathe
May 29, 2018

The set of Beetroots can be generated recursively by length of the base-10 expansion. First one proves a simple lemma (which basically derives from the definition):

Lemma 1. Let B N B_{N} denote the set of Beetroots of length N N . Then for all N > 1 N>1 a positive natural n n is in B N B_{N} if and only if n P n\in\mathbb{P} and n , n + B N 1 { 1 } n^{-},n^{+}\in B_{N-1}\cup\{1\} , where n , n + n^{-},n^{+} are the two N 1 N-1 -digit subsequences of n n .

Lemma 2. If B N = B_{N}=\emptyset for some N > 1 N>1 , then B m = B_{m}=\emptyset for all m N m\geq N . Proof. It suffices to show that B N + 1 = B_{N+1}=\emptyset , then repeating the argument the desired result follows by induction. Suppose a Beetroot n n exists of length N + 1 N+1 and a. Then by Lemma 1, n , n + B N { 1 } = { 1 } = { 1 } n^{-},n^{+}\in B_{N}\cup\{1\}=\emptyset\cup\{1\}=\{1\} , so n , n + = 1 n^{-},n^{+}=1 . Now, technically one of these could be of the form 00 01 00\ldots 01 , as a subsequence of n n . But not both of them. So at least on subsequence of length N N is of the form 1 1 . But this is impossible, as N > 1 N>1 . QED.

Appealing to Lemma 1, it is now easy to generate the Beetroots. Furthermore, it is easy to see when to stop.

B 1 = { 1 , 2 , 3 , 5 , 7 } B_{1}=\{1,2,3,5,7\}

B 2 = { 11 , 12 , , 77 } P = { 11 , 13 , 17 , 23 , 31 , 37 , 53 , 71 , 73 } B_{2}=\{11,12,\ldots,77\}\cap\mathbb{P}=\{11,13,17,23,31,37,53,71,73\}

B 3 = { 111 , 113 , , 737 } P = { 113 , 131 , 137 , 173 , 311 , 313 , 317 , 373 } B_{3}=\{111,113,\ldots,737\}\cap\mathbb{P}=\{113,131,137,173,311,313,317,373\}

B 4 = { 1131 , 1137 , , 3173 } P = { 1373 , 3137 } B_{4}=\{1131,1137,\ldots,3173\}\cap\mathbb{P}=\{1373,3137\}

B 5 = { 31373 } P = B_{5}=\{31373\}\cap\mathbb{P}=\emptyset .

By Lemma 2 it follows that there are no Beetroots of length 5 \geq 5 . Hence, by the above computations, it thus follows that the largest Beetroot is $b=3137$ \fbox{\$b=3137\$} .

To compute the Radishes is easier, as we only need the smallest. The digits of a Radish must lie in { 0 , 4 , 6 , 8 , 9 } \{0,4,6,8,9\} . There are by definition no 1-digit Radishes. The only possibly 2-digit Radishes are

{ 40 , 44 , 46 , , 98 , 99 } P = { 89 } \{40,44,46,\ldots,98,99\}\cap\mathbb{P}=\{89\}

Hence we need not compute any further. The smallest Radish is $r=89$ \fbox{\$r=89\$} .

The desired answer is thus \fbox{\$b^{\frown}r=313789\$} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...