Chapter 24
CHAPTER I.
ARITHMETICAL RECREATIONS.
I commence by describing some arithmetical recreations. The interest excited by statements of the relations between numbers of certain forms has been often remarked, and the majority of works on mathematical recreations include several such problems, which, though obvious to any one acquainted with the elements of algebra, have to many who are ignorant of that subject the same kind of charm that mathematicians find in the more recondite propositions of higher arithmetic. I devote the bulk of this chapter to these elementary problems.
Before entering on the subject, I may add that a large proportion of the elementary questions mentioned here are taken from one of two sources. The first of these is the classical Prohlhnes plaisans et delectables, by Claude Caspar Bachet, sieur de Meziriac, of which the first edition was published in 1612 and the second in 1624 : it is to the edition of 1624 that the references hereafter given apply. Several of Bachet's problems are taken from the writings of Alcuin, Pacioli di Burgo, Tartaglia, and Cardan, and possibly some of them are of oriental origin, but I have made no attempt to add such references. The other source to which I alluded above is Ozanam's Beci^eations mathematiques et physiques. The greater portion of the original edition, published in two volumes at Paris in 1694, was a compilation from the works of Bachet, Mydorge, and Leurechon : this part is excellent, but the same cannot be said of the additions due to Ozanam. In the Biocjraphie Universelle allusion is made to subsequent editions
en. l] ARI'J HMETICAL RECREATIONS 3
issued in 1720, 1735, 1741, 1778, and 1790; doubtless these references are correct, but the following editions, all of which I have seen, are the only ones of which I have any knowledge. In 1696 an edition was issued at Amsterdam. In 1723 — six years after the death of Ozanam — one was issued in three volumes, with a supplementary fourth volume, containing, among other things, an appendix on puzzles. Fresh editions were issued in 1741, 1750 (the second volume of which bears the date 1749), 1770, and 1790. The edition of 1750 is said to have been corrected by Montucla on condition that his name should not be associated with it; but the edition of 1790 is the earliest one in which reference is made to these corrections, though the editor is referred to only as Monsieur M***. Montucla expunged most of what was actually incorrect in the older editions, and added several historical notes, but un- fortunately his scruples prevented him from striking out the accounts of numerous trivial experiments and truisms which overload the work. An English translation of the original edition appeared in 1708, and I believe ran through four editions, the last of them being published in Dublin in 1790. Montucla's revision of 1790 was translated by C. Hutton, and editions of this were issued in 1803, in 1814, and (in one volume) in 1840 : my references are to the editions of 1803 and 1840.
I proceed to enumerate some of the elementary questions connected with numbers which for nearly three centuries have formed a large part of most compilations of mathe- matical amusements. They are given here largely for their historical — not fur their arithmetical — interest ; and perhaps a mathematician may well omit this chapter.
Many of these questions are of the nature of tricks or puzzles, and I follow the usual course and present them in that form. I may note however that most of them are not worth proposing, even as tricks, unless either the method employed is disguised or the result arrived at is different from that expected ; but, as I am not writing on conjuiing, I refrain from alluding to the
1 o
4 ARITHMETICAL RECREATIONS [CH. I
means of disguising the operations indicated, and give merely a bare enumeration of the steps essential to the success of the method used, though I may recall the fundamental rule that no trick, however good, will bear immediate repetition, and that, if it is necessary to appear to repeat it, a different method of obtaining the result should be used.
To FIND A NUMBER SELECTED BY SOME ONE. There are
innumerable ways of finding a number chosen by some one, provided the result of certain operations on it is known. I confine myself to methods typical of those commonly used. Any one acquainted with algebra will find no difficulty in framing new rules of an analogous nature.
First Method*, (i) Ask the person who has chosen the number to treble it. (ii) Enquire if the product is even or odd: if it is even, request him to take half of it; if it is odd, request him to add unity to it and then to take half of it. (iii) Tell him to multiply the result of the second step by 3. (iv) Ask how many integral times 9 divides into the latter product : suppose the answer to be n. (v) Then the number thought of was 2n or 2?i + 1, according as the result of step (i) was even or odd.
The demonstration is obvious. Every even number is of the form 2n, and the successive operations applied to this give (i) 6n, which is even; (ii) J6w = 37i; (iii) SxSn = 9n; (iv) ^9n = n; (v) 2n. Every odd number is of the form 2?i + 1, and the successive operations applied to this give (i) Qn + 3, which is odd; (ii) i(6?i + 3 + 1) = 871 + 2 ; (iii) 3(8?i + 2) = 9/^ + 6; (iv) ^ (9n + 6) = n+ a remainder ; (v) 2?i + 1, These results lead to the rule given above.
Second Methodf. Ask the person who has chosen the number to perform in succession the following operations, (i) To multiply the number by 5. (ii) To add 6 to the product, (iii) To multiply the sum by 4. (iv) To add 9 to the product, (v) To multiply the sum by 5. Ask to be told the result of the last operation: if from this product 165 is subtracted, and
* Baehet, Prohlejiies, Lyons, 1624, problem i, p. 53. t A similar rule was given by Baehet, problem iv, p. 74.
CH. l] ARITHMETICAL RECREATIONS 5
then the remainder is divided by 100, the quotient will be the number thought of originally.
For let n be the number selected. Then the successive operations applied to it give (i) bn; (ii) 5?i + 6 ; (iii) 20/1 + 24; (iv) 20?i + 33, (v) 100;i + 165. Hence the rule.
Third Method*. Request the person who has thought of the number to perform the following operations, (i) To multiply it by any number you like, say, a. (ii) To divide the product by any number, say, 6. (iii) To multiply the quotient by c. (iv) To divide this result by d. (v) To divide the final result by the number selected originally, (vi) To add to the result of operation (v) the number thought of at first. Ask for the sum so found : then, if acjhd is subtracted from this sum, the remainder will be the number chosen originally.
For, if 71 was the number selected, the result of the first four operations is to form nac/bd ; operation (v) gives ac/bd ; and (vi) gives n -^ (ac/bd), which number is mentioned. But ac/bd is known ; hence, subtracting it from the number mentioned, 71 is found. Of course a, b, c, d may have any numerical values it is liked to assign to them. For example, if a =12, 6 = 4, c = 7, d = S it is sufficient to subtract 7 from the final result in order to obtain the number originally selected.
Fourth Methudf, Ask some one to select a number less than 90. Request him to perform the following operations, (i) To multiply it by 10, and to add any number he pleases, a, which is less than 10. (ii) To divide the result of step (i) by 3, and to mention the remainder, say, b. (iii) To multiply the quotient obtained in step (ii) by 10, and to add any number he pleases, c, which is less than 10. (iv) To divide the result of step (iii) by 3, and to mention the remainder, say d, and the third digit (from the right) of the quotient; suppose this digit is e. Then, if the numbers a, b, c, d, e are known, the original number can be at once determined. In fact, if the number is ^x + y, where a; :}> 9 and yi^^, and if r is the
* Bachet, problem v, p. 80.
t Educational Times, London, May 1, 180o, vol. xlviii, p. 234.
6 ARITHMETICAL RECREATIONS [CH. I
remainder when a — h-^o(c — d) is divided by 9, we have 0) = e, y = 9 —r.
The demonstration is not difficult. Suppose the selected num- ber is 9^+1/. Step (i) gives 90a; + IO1/ + a. Let y -h a = Sn -\- b, then the quotient obtained in step (ii) is 30a; + 3?/ + n. Step (iii) gives .300a; + SOy + lOn + c. Let n + c = Sm + d, then the quotient obtained in step (iv) is lOOx + lOy -{■ Sn -\- m, which I will denote by Q. Now the third digit in Q must be x, because, since y :^ S and a :|> 9, we have n :}> 5 ; and since n:^ 5 and c :^ 9, we have w ::f> 4 ; therefore lOy + 8n + m r)^ 99. Hence the third or hundreds digit in Q is x.
Again, from the relations y -\- a = Sn + b and n-\-c= 3m + d, we have 9m — y = a — b + S(c — d) : hence, if r is the remainder when a — b + S(c — d) is divided by 9, we have y = 9 — r. [This is always true, if we make r positive ; but if a—b-\-S(c — d) is negative, it is simpler to take y as equal to its numerical value ; or we may prevent the occurrence of this case by assigning proper values to a and c] Thus ob and y are both known, and therefore the number selected, namely 9x-\-y, is known.
Fifth Method*. Ask any one to select a number less than 60. Request him to perform the following operations, (i) To divide it by 3 and mention the remainder; suppose it to be a. (ii) To divide it by 4, and mention the remainder; suppose it to be b. (iii) To divide it by 5, and mention the remainder; suppose it to be c. Then the number selected is the remairider obtained by dividing 40a + 456 + 36c by 60.
This method can be generalized and then will apply to any number chosen. Let a', b\ c', ... be a series of numbers prime to one another, and let p be their product. Let n be any number less than ^, and let a, 6, c, ... be the remainders when n is divided by a , b', c\ ... respectively. Find a number A which is a multiple of the product b'c'd' ... and which exceeds by unity a multiple of a. Find a number B which is a multiple of a'c'd' ... and which exceeds by unity a multiple
* Bachet, problem vi, p. 84 : Bachet added, on p. 87, a note on the previous history of the problem.
CH. l] ARITHMETICAL RECREATIONS 7
of h', and similarly find analogous numbers C\ D, Rules
for the calculation of A, B, G,... are given in the theory of numbers, but in general, if the numbers a', h' , c\ ... are small, the corresponding numbers A, J5, C, ... can be found by in- spection. I proceed to show that n is equal to the remainder when Aa -\- Bh -\- Gc ■\- . . . is divided by p.
Let N = Aa + 56 + (7c + ..., and let M {x) stand for a multiple of x. Now A = M{a')-\-l, therefore Aa = M {a') -\- a. Hence, if the first term in N, that is Aa, is divided by a, the
remainder is a. Again, 5 is a multiple of ac'd' Therefore
Bh is exactly divisible by a Similarly Gc, Dd,... are each exactly divisible by a\ Thus every term in N, except the first, is exactly divisible by a'. Hence, if N is divided by a', the remainder is a. Also if n is divided by a\ the remainder is a.
Therefore N-7i = M{a).
Similarly N~n = M(b'),
N-n = M{c'\
But a\ b\ c', ... are prime to one another.
.-. N-n = M(a'b'c\..) = M(p),
that is, N=M{jp) + n.
Now n is less than p, hence if N is divided by p, the remainder is n.
The rule given by Bachet corresponds to the case of a' = 3, y = 4, c'=5, p = 60, ^ = 40, 5 = 45, 0=36. If the number chosen is less than 420, we may take a' = 3, 6' = 4, c' = b., d' = 1 , p = 420, il = 280, 5 = 105, (7=336, i) = 120.
To FIND THE RESULT OF A SERIES OF OPERATIONS PER- FORMED ON ANY NUMBER {unknown to the operator) without ASKING ANY QUESTIONS. All rules for solving such problems ultimately depend on so arranging the operations that the number disappears from the final result. Four examples will suffice.
First Example*. Request some one to think of a number. Suppose it to be n. Ask him (i) to multiply it by any number you please, say, a; (ii) then to add, say, 6; (iii) then to divide
* Bachet, problem viii, p. 102.
8 ARITHMETICAL RECREATIONS [CH. I
the sum by, say, c. (iv) Next, tell him to take ajc of the number originally chosen; and (v) to subtract this from the result of the third operation. The result of the first three operations is {na + 6)/c, and the result of operation (iv) is najc : the difference between these is hjc, and therefore is known to you. For example, if a = 6, 6 = 12, c = 4, then ajc = \\, and the final result is 3.
Second Example*. Ask A to take any number of counters that he pleases : suppose that he takes n counters, (i) Ask some one else, say B, to take p times as many, where p is any number you like to choose, (ii) Request A to give q of his counters to B, where q is any number you like to select, (iii) Next, ask B to transfer to ^ a number of counters equal to p times as many counters as A has in his possession. Then there will remain in B's hands q{p-\-^) counters: this number is known to you ; and the trick can be finished either by mentioning it or in any other way you like.
The reason is as follows. The result of operation (ii) is that B has pn + q counters, and A has n — g counters. The result of (iii) is that B transfers p{n — q) counters to A : hence he has left in his possession {pn + q)~- p(n — q) counters, that is, he has q(p-^l).
For example, if originally A took any number of counters, then (if you chose p equal to 2), first you would ask B to take twice as many counters as A had done ; next (if you chose q equal to 3) you would ask A to give 3 counters to B; and then you would ask B to give to A a, number of counters equal to twice the number then in A's possession ; after this was done you would know that B had 3(2 + 1), that is, 9 left.
This trick (as also some of the following problems) may be performed equally well with one person, in which case A may stand for his right hand and B for his left hand.
Third Example. Ask some one to perform in succession the following operations, (i) Take any number of three digits, in which the difference between the first and last digits exceeds unity, (ii) Form a new number by reversing the order of
* Bachet, problem xiii, p. 123 : Bachet presented the above trick in a form, somewhat more general, but less effective in practice.
CH. l] ARITHMETICAL RECREATIONS 9
the digits, (iii) Find the difference of these two numbers, (iv) Form another number by reversing the order of the digits in this difference, (v) Add together the results of (iii) and (iv). Then the sum obtained as the result of this last operation will be 1089.
An illustration and the explanation of the rule are given below.
(i) 237 100a + 106 + c
(ii) 732 100c + 106 + g
(iii) 495 lOO(a-c-l) + 90 + (10 + c-a)
(iv) _594 100(10 + c-a)+ 90 + (a-c-l)
(v) 1089 900 +180 + 9
The result depends only on the radix of the scale of notation in which the number is expressed. If this radix is r, the result is (r - 1) (r + 1)=^ ; thus if r = 10, the result is 9 x 11^, that is, 1089.
Fourth Example*, The following trick depends on the same principle. Ask some one to perform in succession the following operations, (i) To write down any sum of money less than £12, in which the difference between the number of pounds and the number of pence exceeds unity, (ii) To reverse this sum, that is, to write down a sum of money ob- tained from it by interchanging the numbers of pounds and pence, (iii) To find the difference between the results of (i) and (ii). (iv) To reverse this difference, (v) To add to- gether the results of (iii) and (iv). Then this sum will be £12. 185. lid
For instance, take the sum £10. 17^. od.', we have
£ s. d. (i) 10 17 5
(ii) 5 17 10
(iii) 4 19 7
(iv) 7 19 4
(v) 12 18 11
«
Educational Times Reprints, 1890, vol. i.iii, p. 78.
10 ARITHMETICAL RECREATIONS [CH. T
The following analysis explains the rule, and shows that the final result is independent of the sum written down initially.
£ s. d.
(i) a h c
(ii) c h a
(iii) a-c- 1 19 c-a + 12
(iv) c-a + 12 19 a-c- 1
(v) 11 38 11
Mr J. H. Schooling has used this result as the foundation of a slight but excellent conjuring trick. The rule can be generalized to cover any system of monetary units.
Problems involving Two Numbers. I proceed next to give a couple of examples of a class of problems which involve two numbers.
First Example'^. Suppose that there are two numbers, one even and the other odd, and that a person A is asked to select one of them, and that another person B takes the other. It is desired to know whether A selected the even or the odd number. Ask A to multiply his number by 2, or any even number, and B to multiply his by 3, or any odd number. Request them to add the two products together and tell you the sum. If it is even, then originally A selected the odd number, but if it is odd, then originally A selected the even number. The reason is obvious.
Second Example^. The above rule was extended by Bachet to any two numbers, provided they are prime to one another and one of them is not itself a prime. Let the numbers be m and n, and suppose that n is exactly divisible by p. Ask A to select one of these numbers, and B to take the other. Choose a number prime to p, say q. Ask A to multiply his number by q, and B to multiply his number by ^. Request them to add the products together and state the sum. Then A originally selected m or n, according as this result is not or is divisible byp. The numbers, m = 7, n = 15, _p = 3, ^^ = 2, will illustrate the rest.
Problems depending on the Scale of Notation. Many of the rules for finding two or more numbers depend on the * Bachet, problem ix, p. 107. + Bachet, problem xi, p. 113.
CH. l] ARITHMETICAL RECREATIONS 11
fact that in arithmetic an integral number is denoted by a succession of digits, where each digit represents the product of that digit and a power of ten, and the number is equal to the sum of these products. For example, 2017 signifies (2 X lO") + (0 X 10^) + (1 X 10) + 7 ; that is, the 2 represents 2 thousands, i.e. the product of 2 and 10^ the 0 represents
0 hundreds, i.e. the product of 0 and 10^; the 1 represents
1 ten, i.e. the product of 1 and 10, and the 7 represents 7 units. Thus every digit has a local value. The application to tricks connected with numbers will be understood readily from three illustrative examples.
First Example*. A common conjuring trick is to ask a boy among the audience to throw two dice, or to select at random from a box a domino on each half of which is a number. The boy is then told to recollect the two numbers thus obtained, to choose either of them, to multiply it by 5, to add 7 to the result, to double this result, and lastly to add to this the other number. From the number thus obtained, the conjurer sub- tracts 14, and obtains a number of two digits which are the two numbers chosen originally.
For suppose that the boy selected the numbers a and h. Each of these is less than ten — dice or dominoes ensuring this. The successive operations give (i) ^a] (ii) 5a 4- 7; (iii) 10a + 14; (iv) 10(1 + 14 + 6. Hence, if 14 is subtracted from the final result, there will be left a number of two digits, and these digits are the numbers selected originally. An analogous trick might be performed in other scales of notation if it was thought necessary to disguise the process further.
Second Example^. Similarly, if three numbers, say, a, h, c, are chosen, then, if each of them is less than ten, they can be
* Some similar questions were given by Bachet in problem xii, p. 117 ; by Oughtred or Leake in the Mathematicall Recreations, commonly attributed to the former, London, 1653, problem xxxiv; and by Ozanam, part i, chapter x. Probably the Mathematicall Recreations were compiled by Leake, but as the work is usually catalogued under the name of W. Oughtred, I shall so describe it: it is founded on the similar work by J. Leurechon, otherwise known as n. van Etten, published in 1G26.
t Bachet gave some similar (Questions in problem xii, p. 117.
12 ARITHMETICAL RECREATIONS [CH. I
found by the following rule, (i) Take one of the numbers, say, a, and multiply it by 2. (ii) Add 3 to the product, (iii) Multiply this by 5, and add 7 to the product, (iv) To this sum add the second number, b. (v) Multiply the result by 2. (vi) Add 3 to the product, (vii) Multiply by 5, and, to the product, add the third number, c. The result is 100a + 106 + c + 235. Hence, if the final result is known, it is sufficient to subtract 235 from it, and the remainder will be a number of three digits. These digits are the numbers chosen originally.
Third Example*. The following rule for finding the age of a man born in the 19th century is of the same kind. Take the tens digit of the year of birth ; (i) multiply it by 5 ; (ii) to the product add 2 ; (iii) multiply the result by 2 ; (iv) to this product add the units digit of the birth-year ; (v) subtract the sum from 120. The result is the man's age in 1916.
The algebraic proof of the rule is obvious. Let a and b be the tens and units digits of the birth-year. The successive opera- tions give (i) 5a; (ii) 5a + 2; (iii) lOci + 4; (iv) 10a + 4 + 6; (v) 120- (10a + 6), which is his age in 1916. The rule can be easily adapted to give the age in any specified year.
Fourth Example^. Another such problem but of more difficulty is the determination of all numbers which are in- tegral multiples of their reversals. For instance, among numbers of four digits, 8712 = 4 x 2178 and 9801 = 9 x 1089 possess this property.
Other Problems with numbers in the denary scale. I may mention here two or three other problems which seem to be unknown to most compilers of books of puzzles.
First Problem. The first of them is as follows. Take any number of three digits : reverse the order of the digits : sub- tract the number so formed from the original number : then, if the last digit of the difference is mentioned, all the digits in the difference are known.
* A similar question was given by Laisant and Perrin in their Algebre, Paris, 1892; and in L' Illustration for July 13, 1895.
t L'lntermediaire des Matheinaticiens , Paris, voL xv, 1908, pp. 228, 278; vol. XVI, 1909, p. 34; vol. xix, 1912, p. 128.
CH. l] ARITHMETICAL RECREATIONS 13
For suppose the number is 100a + 106 + c, that is, let a be the hundreds digit of the number chosen, h be the tens digit, and c be the units digit. The number obtained by reversing the digits is 100c 4- 106 + a. The difference of these numbers is equal to (100a + c) - (100c + a), that is, to 99 (a - c). But a - c is not greater than 9, and therefore the remainder can only be 99, 198, 297, 396, 495, 594, 693, 792, or 891— in each case the middle digit being 9 and the digit before it (if any) being equal to the difference between 9 and the last digit. Hence, if the last digit is known, so is the whole of the remainder.
Second Problem. The second problem is somewhat similar and is as follows, (i) Take any number ; (ii) reverse the digits ; (iii) find the difference between the number formed in (ii) and the given number; (iv) multiply this difference by any number you like to name; (v) cross out any digit except a nought; (vi) read the remainder. Then the sum of the digits in the remainder subtracted from the next highest multiple of nine will give the figure struck out. This is clear since the result of operation (iv) is a multiple of nine, and it is known that the sum of the digits of every multiple of nine is itself a multiple of nine.
Empirical Problems. There are also numerous empirical problems, such as the following. With the ten digits, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, express numbers whose sum is unity : each digit being used only once, and the use of the usual notations for fractions being allowed. With the same ten digits express numbers whose sum is 100. With the nine digits, 9, 8, 7, 6, 5, 4, 3, 2, 1, express four numbers whose sum is 100. To the making of such questions there is no limit, but their solution involves little or no mathematical skill.
Four Digits Problem. I suggest the following problem as being more interesting. With the digits 1, 2, ... w, express the consecutive numbers from 1 upwards as far as possible, say to p : four and only four digits, all different, being used in each number, and the notation of the denary scale (including decimals), as also algebraic sums, products, and positive integral powers, being allowed. If the use of the symbols
14 ARITHMETICAL RECREATIONS [CH. I
for square roots and factorials (repeated if desired a finite number of times) is also permitted, the range can be ex- tended considerably, say to q consecutive integers. If w = 4, I make jp = 88, (? = 264 ; if n = 5, _p = 231, ^ = 790 ; with the four digits 0, 1, 2, 3, ^^ = 36, q — 40. The problem is not easy, and these limits may be too low.
Four Fours Problem. Another traditional recreation is, with the ordinary arithmetic and algebraic notation, to express the consecutive numbers as far as possible in terms of four " 4's." Everything turns on what we mean by ordinary notation. I take it that this allows the use of the denary scale {ex. gr. numbers like 44) and decimals ; the symbols for factorials and square roots (repeated if desired a finite number of times) ; and the symbols for addition, subtraction, multiplication, division, and brackets; but I consider that indices (other than first powers), not expressible by a " 4 " or " 4's," and roots (other than square roots) are excluded ; and that though a number like 2 can be expressed by one " 4," numbers like "2 and 22 are inadmissible. On these assumptions we can express every number up to and including 112. If we also allow the use of subfactorials * we can thus express every number up to and including 87 7 f. The similar problems of the expression by four"9's" in ordinary notation up to 132, and by four"3's," with the use of subfactorials, up to 153, present no difficulty.
Problems with a series of things which are numbered. Any collection of things which can be distinguished one from the other — especially if numbered consecutively — afford easy concrete illustrations of questions depending on these ele- mentary properties of numbers. As examples I proceed to enumerate a few familiar tricks. The first two of these are commonly shown by the use of a watch, the last four may be exemplified by the use of a pack of playing cards. I present them in these forms.
* Subf actorial n is written n| or n j and is equal to
n\ (l-l/l! + l/2!-l/3! + ...±l/n!).
+ For the method used to obtain these results and extensions of them, see the Mathematical Gazette, May, 1912.
CH. l] AKITHMETKJAL RECREATIONS 15
First Example*. The first of these examples is connected with the hours marked on the face of a watch. In this puzzle some one is asked to think of some hour, say, w, and then to touch a number that marks another hour, say, n. Then if, beginning with the number touched, he taps each successive hour marked on the face of the watch, going in the opposite direction to that in which the hands of the watch move, and reckoning to himself the taps as m, {m + 1 ), &c., the (7i + 12)th tap will be on the hour he thought of For example, if he thinks of v and touches ix, then, if he taps successively IX, Viii, VII, Vi, ..., going backwards and reckoning them respectively as 5, 6, 7, 8, . . . , the tap which he reckons as 21 will be on the v.
The reason of the rule is obvious, for he arrives finally at the (n + 12 — m)th hour from w^hich he started. Now, since he goes in the opposite direction to that in which the hands of the watch move, he has to go over {n — m) hours to reach the hour m : also it will make no difierence if in addition he goes over 12 hours, since the only effect of this is to take him once completely round the circle. Now (ti + 12 — m) is always positive, since n is positive and m is not greater than 12, and therefore if we make him pass over (?^+ 12 — m) hours we can give the rule in a form which is equally valid whether m is greater or less than n.
Second Example. The follow*ing is another well-kno^vn watch-dial problem. If the hours on the face are tapped suc- cessively, beginning at vii and proceeding backwards round the dial to VI, V, &c., and if the person who selected the number counts the taps, beginning to count from the number of the hour selected (thus, if he selected x, he would reckon the first tap as the 11th), then the 20th tap as reckoned by him will be on the hour chosen.
For suppose he selected the ?ith hour. Then the 8th tap is on XII and is reckoned by him as the {n -\- 8)th ; and the tap
* Bachet, problem xx, p. 155; Ougbtied or Leake, Mathematkall Rccrea- tiovs, London, 1653, p. 28.
16 ARITHMETICAL RECREATIONS [CH. I
which he reckons as (n + p)th. is on the hour (20 — p). Hence, putting p = 20 — n, the tap which he reckons as 20th is on the hour n. Of course the hours indicated by the first seven taps are immaterial : obviously also we can modify the presentation by beginning on the hour viii and making 21 consecutive taps, or on the hour ix and making 22 consecutive taps, and so on.
Third Example. The following is another simple example. Suppose that a pack of n cards is given to some one who is asked to select one out of the first m cards and to remember (but not to mention) what is its number from the top of the pack ; suppose it is actually the icth card in the pack. Then take the pack, reverse the order of the top m cards (which can be easily effected by shuffling), and transfer y cards, where y firom the bottom to the top of the pack. The effect of this is that the card originally chosen is now the (y •{• m — x + l)th. from the top. Return to the spectator the pack so rearranged, and ask that the top card be counted as the (x-\- l)th, the next as the (x + 2)th, and so on, in which case the card originally chosen will be the (y + m + l)th. Now y and m can be chosen as we please, and may be varied every time the trick is per- formed ; thus any one unskilled in arithmetic will not readily detect the method used.
Fourth Example*. Place a card on the table, and on it place as many other cards from the pack as with the number of pips on the card will make a total of twelve. For example, if the card placed first on the table is the five of clubs, then seven additional cards must be placed on it. The court cards may have any values assigned to them, but usually they are reckoned as tens. This is done again with another card, and thus another pile is formed. The operation may be repeated either only three or four times or as often as the pack will permit of such piles being formed. If finally there are p such piles, and if the number of cards left over is r, then the sum of the number of pips on the bottom cards of all the piles will be 13 ( p - 4) + r.
For, if a? is the number of pips on the bottom card of a pile, * A particular case of this problem was given by Bachet, problem xvn, p. 138.
CH. l] ARITHMETICAL RECREATIONS 17
the number of cards in that pile will be 13 — a?. A similar argument holds for each pile. Also there are 52 cards in the pack ; and this must be equal to the sum of the cards in the p piles and the r cards left over.
.-. (13-^,) + (13-a'.3)+... + (13-^p) + r = 52,
.*. ISp — (x^-{-Xo-\- ... -\- Xp) + ?' = 52,
,\ {Ci-\-a;o+ ... +Xp = ISp — 52 + r
= 13(j^-4) + r.
More generally, if a pack of n cards is taken, and if in each pile the sum of the pips on the bottom card and the number of cards put on it is equal to m, then the sum of the pips on the bottom cards of the piles will be {m + l)p + r — n. In an ecarte pack 71= 32, and it is convenient to take m= 15.
Fifth Example. It may be noticed that cutting a pack of cards never alters the relative position of the cards provided that, if necessary, we regard the top card as following im- mediately after the bottom card in the pack. This is used in the following trick*. Take a pack, and deal the cards face upwards on the table, calling them one, two, three, &c. as you put them down, and noting in your own mind the card first dealt. Ask some one to select a card and recollect its number. Turn the pack over, and let it be cut (not shuffled) as often as you like. Enquire what was the number of the card chosen. Then, if you deal, and as soon as you come to the original first card begin (silently) to count, reckoning this as one, the selected card will appear at the number mentioned. Of course, if all the cards are dealt before reaching this number, you must turn the cards over and go on counting continuously.
Sixth Example. Here is another simple question of this class. Remove the court cards from a pack. Arrange the remaining 40 cards, faces upwards, in suits, in four lines thus. In the first line, the 1, 2, ... 10, of suit ^; in the second line, the 10, 1, 2, ... 9, of suit B; in the third line, the 9, 10, 1, ... 8, of suit C; in the last line, the 8, 9, 10, 1, ... 7, of suit D. Next take up, face upwards, the first card of line 1, put below it the
♦ Bachet, problem xix, p. 152. B. R. 2
18 ARITHMETICAL RECREATIONS [CH. I
first card of line 2, below that the first card of line 3, and below that the first card of line 4. Turn this pile face downwards. Next take up the four cards in the second column in the same way, turn them face downwards, and put them below the first pile. Continue this process until all the cards are taken up. Ask someone to mention any card. Suppose the number of pips on it is n. Then if the suit is A, it will be the 4nth card in the pack ; if the suit is B, it will be the (4?i + 3)th card ; if the suit is C, it will be the (4?i + 6)th card ; and if the suit is D, it will be the {4m + 9)th card. Hence by counting the cards, cyclically if necessary, the card desired can be picked out. It is easy to alter the form of presentation, and a full pack can be used if desired. The explanation is obvious.
Medieval Problems in Arithmetic. Before leaving the subject of these eleaientary questions, I may mention a few problems which for centuries have appeared in nearly every collection of mathematical recreations, and therefore may claim what is almost a prescriptive right to a place here.
Fii'st Example. The following is a sample of one class of these puzzles. A man goes to a tub of water with two jars, of which one holds exactly 3 pints and the other 5 pints. How can he bring back exactly 4 pints of water ? The solution presents no difficulty.
Second Example*. Here is another problem of the same kind. Three men robbed a gentleman of a vase, containing 24 ounces of balsam. Whilst running away they met a glass-seller, of whom they purchased three vessels. On reaching a place of safety they wished to divide the booty, but found that their vessels contained 5, 11, and 13 ounces respectively. How could they divide the balsam into equal portions ? Problems like this can be worked out only by trial.
Third Example f. The next of these is a not uncommon
* Some similar problems were given by Bachet, Appendix, problem in, p. 206; problem ix, p. 233: by Oughtred or Leake in the Mathematicall Recreations, p. 22: and by Ozanam, 1803 edition, vol. i, p. 174; 1840 edition, p. 79. Earlier instances occur in Tartaglia's writings.
+ Bachet, problem xxii, p. 170.
CH. l] ARITHMETICAL RECREATIONS 19
game, played by two people, say A and B. A begins by mentioning some number not greater than (say) six, B may add to that any number not greater than six, A may add to that again any number not greater than six, and so on. He wins who is the first to reach (say) 50. Obviously, if A calls 43, then whatever B adds to that, A can win next time. Similarly, if A calls 36, B cannot prevent A's calling 43 the next time. In this way it is clear that the key numbers are those forming the arithmetical progression 43, 36, 29, 22, 15, 8, 1 ; and whoever plays first ought to win.
Similarly, if no number greater than m may be added at any one time, and n is the number to be called by the victor, then the key numbers will be those forming the arithmetical pro- gression whose common difference is m + 1 and whose smallest term is the remainder obtained by dividing n by m + 1.
The same game may be played in another form by placing p coins, matches, or other objects on a table, and directing each player in turn to take away not more than m of them. Who- ever takes away the last coin wins. Obviously the key numbers are multiples of m + 1, and the first player who is able to leave an exact multiple of (m + 1) coins can win. Perhaps a better form of the game is to make that player lose who takes away the last coin, in which case each of the key numbers exceeds by unity a multiple of m + 1.
Another variety* consists in placing p counters in the form of a circle, and allowing each player in succession to take away not more than m of them which are in unbroken sequence : m being less than p and greater than unity. In this case the second of the two players can always win.
These games are simple, but if we impose on the original problem the restriction that each player may not add the same number more than (saj-) three times, the analysis becomes by no means easy. I have never seen this ex- tension described in print, and I will enunciate it at length. Suppose that each player is given eighteen cards, three of them marked 6, three marked 5, three marked 4, three * S. Loyd, Tit-Bits, London, July 17, Aug. 7, 1897.
2—2
20 ARITHMETICAL RECREATIONS [CH. I
marked 3, three marked 2, and three marked 1. They play alternately ; A begins by playing one of his cards ; then B plays one of his, and so on. He wins who first plays a card which makes the sum of the points or numbers on all the cards played exactly equal to 50, but he loses if he plays a card which makes this sum exceed 50. The game can be played by noting the numbers on a piece of paper, and it is not necessary to use cards.
Thus suppose they play as follows. A takes a 4, and scores 4; B takes a 3, and scores 7; A takes a 1, and scores 8; B takes a 6, and scores 14; ^ takes a 3, and scores 17 ; jB takes a 4, and scores 21 ; ^ takes a 4, and scores 25; B takes a 5, and scores 30 ; A takes a 4, and scores 34 ; B takes a 4, and scores 38 ; A takes a
5, and scores 43. B can now win, for he may safely play 3, since A has not another 4 wherewith to follow it; and if A plays less than 4, B will win the next time. Again, suppose they play thus. A, 6; B, S; A, 1; B, Q; A, S; B, 4>; A, 2; B,5;A,1;B,5;A,2;B,5;A,2;B,S, ^ is now forced to play 1, and B wins by playing 1.
A slightly different form of the game has also been sug- gested. In this there are put on the table an agreed number of cards, say, for example, the four aces, twos, threes, fours, fives, and sixes of a pack of cards — twenty-four cards in all. Each player in turn takes a card. The score at any time is the sum of the pips on all the cards taken, whether by A or B. He wins who first selects a card which makes the score equal, say, to 50, and a player who is forced to go beyond 50 loses.
Thus, suppose they play as follows. A takes a 6, and scores 6; B takes a 2, and scores 8; A takes a 5, and scores 13; B takes a 2, and scores 15; A takes a 5, and scores 20; B takes a 2, and scores 22; A takes a 5, and scores 27 ; jB takes a 2, and scores 29 ; A takes a 5, and scores 34 ; B takes a
6, and scores 40 ; A takes a 1, and scores 41 ; B takes a 4, and scores 45 ; A takes a 3, and scores 48 ; B now must take 1, and thus score 49 ; and A takes a 1, and wins.
In these variations the object of each player is to get to one of the key numbers, provided there are sufficient available
CH. l] ARITHMETICAL RECREATIONS 21
remaining numbers to let him retain the possession of each subsequent key number. The number of cards used, the points on them, and the number to be reached can be changed at will ; and the higher the number to be reached, the more difficult it is to forecast the result and to say whether or not it is an advantage to begin.
Fourth Example. Here is another problem, more difficult and less well known. Suppose that m counters are divided into ?i heaps. Two players play alternately. Each, when his turn comes, may select any one heap he likes, and remove from it all the counters in it or as many of them as he pleases. That player loses who has to take up the last counter.
To solve it we may proceed thus*. Suppose there are a^ counters in the rth heap. Express a^ in the binary scale, and denote the coefficient of 2^ in it by drp. Do this for each heap, and let 8p be the sum of the coefficients of 2^ thus determined. Thus Sp = dip + d^p + cl^p-^ ..., Then either Sq, Sx,S^,... are all even, which we may term an A arrangement, or they are not all even, which we may term a B arrangement.
It will be easily seen that if one player, P, has played so as to get the counters in any A arrangement (except that of an even number of heaps each containing one counter), he can force a win. For the next move of his opponent, Q, must bring the counters to a 5 arrangement. Then P can make the next move to bring the counters again to an A arrangement, other than the exceptional one of an even number of heaps each con- taining only one counter. Finally this will leave P a winning position, ex. gr. two heaps each containing 2 counters.
If that player wins who takes the last counter, the rule is easier. For if one player P has played so as to get the counters in any B arrangement, he can force a win, since the next move of his opponent Q must bring the counters to an A arrangement. Then P can make the next move to bring the counters again to a B arrangement. Finally this will leave P a winning position.
Fifth Exajiiple. The following medieval problem is some- what more elaborate. Suppose that three people, P, y, R, * From a letter to me by Mr R. K. Morcom, August 2, 1910.
22 ARITHMETICAL RECREATIONS [CH. I
select three things, which we may denote by a, e, i respec- tively, and that it is desired to find by whom each object was selected*.
Place 24 counters on a table. Ask P to take one counter, Q to take two counters, and R to take three counters. Next, ask the person who selected a to take as many counters as he has already, whoever selected e to take twice as many counters as he has already, and whoever selected i to take four times as many counters as he has already. Note how many counters remain on the table. There are only six ways of distributing the three things among P, Q, and R ; and the number of counters remaining on the table is different for each way. The remainders may be 1, 2, 3, 5, 6, or 7. Bachet summed up the results in the mnemonic line Par fer (1) Cesar (2) jadis (3) devint (5) si grand (6) prince (7). Corresponding to any remainder is a word or words containing two syllables : for instance, to the remainder 5 corresponds the word devint. The vowel in the first syllable indicates the thing selected by P, the vowel in the second syllable indicates the thing selected by Q, and of course R selected the remaining thing.
Extension. M. Bourlet, in the course of a very kindly notice f of the second edition of this work, gave a much neater solution of the above question, and has extended the problem to the case of n people, Po, Pj, Pg, ..., Pn-i, each of whom selects one object, out of a collection of n objects, such as dominoes or cards. It is required to know which domino or card was selected by each person.
Let us suppose the dominoes to be denoted or marked by the numbers 0, 1, ..., n — 1, instead of by vowels. Give one counter to Pj, two counters to Pg, and generally k counters to Pji. Note the number of counters left on the table. Next ask the person who had chosen the domino 0 to take as many counters as he had already, and generally whoever had chosen the domino h to take n^ times as many dominoes as he had already: thus if P^ had chosen the domino numbered h,
* Bachet, problem xxv, p. 187.
t Bulletin dcs Sciences Matliematiques, Paris, 1893, vol. xvii, pp. 105 — 107.
