All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Samba Primes (Posted on 2011-06-14) Difficulty: 3 of 5

Let capitalised letters of the alphabet stand for 4-digit prime numbers each of whose digits is distinct and also prime, so that e.g. A=5237.

A pair of such letters stands for the concatenation of two such numbers to form an 8-digit number, e.g. AA=52375237

Denote 8 different such 4-digit primes by the letters of the word CAPTURES, so that each of CP,ET,PU,RU,TE,TR, and UC is also prime.

Given that A=5237, what is the value of S?

No Solution Yet Submitted by broll    
Rating: 3.6000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Hmmmm... computer solution (spoiler) | Comment 2 of 9 |

When this puzzle was in the queue, I hadn't thought of the limitations on the 4-digit primes, and was given a solution by the poser, broll, but only perused is far enough to see that there were only 8 candidate 4-digit primes.  I didn't go through the remainder of the solution. But now that I've solved it myself, I see there are two solutions.

First the program and its findings:

   5   dim Pr4(10)
  10   N$="7532":H$=N$:PCt=0
  15   repeat
  20    gosub *Permute(&N$)
  30    if prmdiv(val(N$))=val(N$) then inc PCt:print PCt;N$:Pr4(PCt)=val(N$)
  35   until N$=H$
 100   for A=1 to PCt:for B=1 to PCt
 110     Pr8=10000*Pr4(A)+Pr4(B)
 120     if prmdiv(Pr8)=Pr8 then print Pr8;A;B
 199   next B:next A
 740   end
 800

The permute algorithm is listed elsewhere on the site.

 1 2357
 2 2753
 3 3257
 4 3527
 5 5237
 6 5273
 7 7253
 8 7523
 23572753  1  2
 23573527  1  4
 23577523  1  8
 27533257  2  3
 32575273  3  6
 35272357  4  1
 52732357  6  1
 52737253  6  7
 72533257  7  3
 72537523  7  8
 75235273  8  6
 


First the 4-digit primes are numbered 1 to 8. Then the formable 8-digit primes are listed, with the numbers of the two 4-digit primes that make up each one.

Two possible sets of assignment work. I show the ordinal number of the 4-digit prime beneath the corresponding letter:

CAPTURES     CAPTURES
65713248     75316842

In the first set, S equates to the 8th 4-digit prime, 7523. In the second set, S equates to the 2nd 4-digit prime, 2753.


  Posted by Charlie on 2011-06-14 14:46:24
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information