ERJ Brainteaser: September
4 Oct 2024
For superb answers to Q2 and Q4, it’s congratulations to: John Bowen, Michele Girardi, Andrew Knox, Kamila Staszewska, new joint holders of the Brainiac of the Month title
Question 4: Bellonia calling
The newly formed state of Bellonia has introduced a domestic dialling system for all 4 million telephone lines installed in the country. If each phone-number is made up of seven digits (excluding area codes), approximately what is the probability of any single phone number (excluding area code) being a prime number?
Answer: Around 6%, as so neatly worked out by: Andrew Knox, Rubbond International, Ohé en Laak, The Netherlands; John Bowen, consultant, Bromsgrove, UK; Kamila Staszewska, R&D / quality lead, Abcon Industrial Products Ltd, Cootehill, Co. Cavan, Ireland; Michele Girardi, quality manager, Scame Mastaf SpA, Suisio, Italy. Well done to all and everyone else who had a go.
SOLUTIONS
Andrew Knox
About 6% of the new phone numbers would be prime numbers.
7-digit numbers will lie between 1,000,000 and 10,000,000, neither of which are prime numbers.
It appears (from Internet) that there are 664,579 prime numbers up tp 10,000,000 and 78,498 up to 1,000,000.
So there are 664,579 - 78,498 = 586,081 prime numbers between 1,000,000 and 10,000,000.
If 10,000,000 numbers were required, the probability a number being prime is therefore 586,081/10,000,000 = .0586 or roughly 5,86%
If only the first 4,000,000 7-digit numbers are used, then the probability will be slightly higher, say 6%, as the number of primes less than "x" decreases gradually as x increases, as in the following graph. The slope however is reasonably close to a straight line as x increases.
If 7-digit numbers between 1,000,000 and 9,999,999 are chosen randomly, then the probability any number is prime will be approx. 5,86%.
John Bowen
The fraction of primes reduces assymptotically as the number increases, as the number of primes in the first 10 is 4, out of 10, which is 40%, from 1 to 100 is 25% and from 1 to 1000 is 168, or 16.8%. With 4,000,000 subscribers: ln 4,000,000 is 15,2, so the probability we need is 1/15.2 = 0.0658 or 6.58%.
Kamila Staszewska
Assuming 1000000 is first telephone number and 4000000 were issued so 5000000 is the last telephone number:
Using prime number theorem gives estimated number of primes:
π(x)=x/lnx
π(1000000)=1000000/ln(1000000)=72382
π(5000000)=5000000/ln(5000000)=324150
Then calculate estimated number of primes between 5000000 and 1000000:
π(5000000)-π(1000000)=324150-72382=251768
Probability of any single phone number being a prime:
P=251768/4000000=~6.3%.
Michele Girardi
The answer is about 6.6% .
According to the Prime Number Theorem, the number of prime numbers less or equal than N tends to N/log(N), where log(N) is the natural logarithm of N.
So the probability is N/log(N) / N = 1/log(N) .
Supposing that the numbers range from 0000001 to 4000000 applying the formula we get
1/log(4.000.000) = 0.066 = 6.6%.
New teaser on Monday.
Question 3: City connection
Find the connection between these cities (ordered alphabetically):
Antwerp, Atlanta, Barcelona, LA, Melbourne, Montreal, Munich, St. Louis, Sydney...
Answer: A neat set of replies to this tricky teaser, especially from Sudi Sudarshan, principal consultant, Global Mobility Strategies, USA, who spotted the ‘non-capital’ Olympic city connection. Very well done also to: John Bowen, consultant, Bromsgrove, UK; Andrew Knox, Rubbond International, Ohé en Laak, The Netherlands; John Coleman, membership manager, Circol ELT, Dublin, Ireland; and everyone else who had a go.
SOLUTIONS
John Bowen
These cities have all hosted a modern summer Olympic Games
Sudi Sudarshan
This is a list of cities that have hosted the Summer Olympics that have also never been national capitals.
There is just one city, Rio de Janeiro, that is not presently a national capital that has hosted the Summer Olympics games but it was the Brazilian capital until 1960.
John Coleman
This list of cities hosted the Olympic Games in the following years:
- Antwerp: 1920
- Atlanta: 1996
- Barcelona: 1992
- Los Angeles (LA): 1932, 1984
- Melbourne: 1956
- Montreal: 1976
- Munich: 1972
- St. Louis: 1904
- Sydney: 2000
(similarly)
Andrew Knox
Answer: These are all host cities for the summer Olympic games.
In chronological order:
1904 St. Louis
1920 Antwerp
1932 Los Angeles (and again in 1984)
1956 Melbourne
1972 Munich
1976 Montreal
1992 Barcelona
1996 Atlanta
2000 Sydney
Question 2: Secret combination
Veronica has worked out a new four-digit number for the combination lock on her bicycle. This is coded A, B, C, D, with each letter representing a different digit from 1 to 9. If this number is divisible by 13, BCDA is divisible by 11, CDAB is divisible by 9, and DABC is divisible by 7, what is the original number ABCD?
Answer: As so neatly worked out (see Solutions below) by our select group here, the combination is 3861 . Well done to: John Bowen, consultant, Bromsgrove, UK; Kamila Staszewska, R&D / quality lead, Abcon Industrial Products Ltd, Cootehill, Co. Cavan, Ireland; Andrew Knox, Rubbond International, Ohé en Laak, The Netherlands; Michele Girardi, quality manager, Scame Mastaf SpA, Suisio, Italy; Sudi Sudarshan, principal consultant, Global Mobility Strategies, USA; and everyone else who had a go.
SOLUTIONS
John Bowen
Much aspirin needed!
However I think the following works:
If BCDA is divisible by 11, then so is ABCD, because both mean that A+C-B-D is divisible by 11.[requirement for divisibility by 11]
If CDAB is divisible by 9, then so is ABCD, because both mean that A+B+C+D is divisible by 9.
Therefore, ABCD is divisible by 13*11*9=1287, the only possibilities are 1287, 2574, 3861, 5148, 6435, 7722, 9009.
Among them, excluding the two with repeated digits, only 3861 satisfies the last clue - 1386 is divisible by 7, by calculator.
Therefore, ABCD is 3861.
Kamila Staszewska
The answer is 3861.
3861/13=351
8613/11=783
6138/9=682
1386/7=198
Michele Girardi
Hello everybody,
The answer could be 3861 or 7722.
ABCD is divisible by 13 .
If BCDA is divisible by 11, it's B+D=C+A, so ABCD is too
if CDAB is divisible by 9, C+D+A+B is divisible by 9, this applies to ABCD too
We can deduct that ABCD is obtained multiplying 13,11,9 by another number .
Let's do a table, calculate DABC and verify which number is divisible by 7
ABCD DABC rest of DABC/7
9*11*13*1 = 1287 7128 2
9*11*13*2 = 2574 4257 1
9*11*13*3 = 3861 1386 0
9*11*13*4 = 5148 8514 2
9*11*13*5 = 6435 5643 1
9*11*13*6 = 7722 2772 0
9*11*13*7 = 9009 NA (zeros)
Andrew Knox
The 4 digit number of the combination here is represented by the letters ABCD, whereby the digits cannot be used more than once and none can be zero, and have in this sequence (ABCD) has to be divisible by 13. The difficulty arises in the second criteria - that sequence of the letters is changed, and the resulting 4-digit number then has to be divisible by 11, 9 or 7.
This can be represented by the following equations:
ABCD - 13n = 0, where n can be any integer
BCDA - 11n = 0
CDAB - 9n = 0
DABC - 7n = 0
10x tables for the numbers 13, 11, 9 & 7 learns that the last digit in all cases can be anything from 1 to 9 AND 0 for each. So that doesn't appear to help.
The letters ABCD have to represent a four-digit number between 1234 and 9876.
Trial and error on the number 13 gives the following:
n = 77 = 1001 (1st 4-digit number)
n = 95 = 1235 (surprisingly, the first valid number meeting the criteria)
n = 759 = 9867 (last valid mumber before exceeding 4 digits.
Unfortuneately there are 4 or 5 values of n for each increase of 100 in the value of 13n or ABCD. That means (in spite of a surprisingly rapid jump of n from 77 to 95 for the next valid result, there are probably about 300 - 400 values of n whose product meets the criteria no 0's and unique digits.
Having worked out what those 300 - 400 combinations are for ABCD, one then has to move the number in position A to to the end of the sequence, and repeat the procedure by dividing the resulting 300 - 400 combinations by 11. Those that result in an exact division (a whole integer) can then go on to the next transformation and subsequent division by 9. The next transformation and division by 7 will yeild the answer.
A mathematician will probably have a much quicker solution using some kind of factorization - or write a cumputer programme to perform the trial and error described above in a split second.
Follow-up note: I can't believe I actually bothered to work this one out to the answer! ....?
If you follow the procedure I gave below there are only 5 combinations left from the twenty-nine 4-digit numbers that are divisible by 9, and only one of these (after moving the first digit to the end) was divisible by 7, giving DABC = 1386. So the combination of the lock ABCD is therefore 3861.
Sudi Sudarshan
Solution: I couldn't come up with an elegant approach and so resorted to brute force.
CDAB is divisible by 9. Based on the property of numbers divisible by 9, the sum of the digits should be a multiple of 9.
The valid sets of digits that are also non-zero and unique are:
{1,2,6,9}, {1,2,7,8},{1,3,5,9},{1,3,6,8},{1,4,5,8},{1,4,6,7},{2,3,4,9},{2,3,5,8},{2,3,6,7},{2,4,5,7},{3,4,5,6},{3,7,8,9},{4,6,8,9},{5,6,7,9}
That's 14 sets of 4 digits which will generate 14*4! or 336 unique numbers.
BCDA is divisible by 11. Since CDAB is divisible by 9, all permutations of this including BCDA are divisible by 9. So BCDA is divisible by 9*11 = 99
Generating all 4 digit numbers that are multiples of 99 but also have unique digits, yields us the following list of valid numbers for BCDA:
1287,1386,1485,1584,1683,1782,2178,2376,2475,2574,2673,2871,3168,3267,3465,3564,3762,3861,4158,4257,4356,4653,4752,4851,5148,5247,5346,5643,5742,5841,6138,6237,6435,6534,6732,6831,7128,7326,7425,7524,7623,7821,8217,8316,8415,8514,8613,8712
The numbers ABCD corresponding to these 48 numbers are:
2871,3861,4851,5841,6831,7821,1781,3762,4752,5742,6732,8712,1683,2673,4653,5643,7623,8613,1584,2574,3564,6534,7524,8514,1485,2475,3465,6435,7425,8415,1387,2376,4356,5346,7326,8316,1287,3267,4257,5247,6237,2178,3168,4158,5148,6138,7128
Testing for divisibility by 13, only the following ABCD numbers qualify: 3861,2574,6435,1287,5148
The corresponding numbers DABC are: 1386,4257,5643,7128,8514
Testing for divisibility by 7, the only number that works is 1386
So DABC = 1386
ABCD = 3861
Question 1: Score board
60, 57, 54, 51, ?, ...
Answer: Seems not every reader is familiar with the scoring in a game of darts - apologies if so. These are the highest scores you can get with a single dart-throw, in descending order - ie treble 20, 19, 18... etc. Very well done for hitting the bullseye (50) to: Andrew Knox, Rubbond International, Ohé en Laak, The Netherlands; John Coleman, membership manager, Circol ELT, Dublin, Ireland; Sudi Sudarshan, principal consultant, Global Mobility Strategies, USA; Kamila Staszewska, R&D / quality lead, Abcon Industrial Products Ltd, Cootehill, Co. Cavan, Ireland.