When the ball bearings are dropped into the water the change in its height \(h_1\) is given by:\[\pi r^2 N^2 h_1 = \frac{4}{3}\pi r^3N\] which gives \(h_1=4r/3N\).

When the ball bearings are placed in the boat, the boat will sink until the increased pressure is sufficient to support their weight. If it sinks by a length \(h\) we can equate the increased water pressure to the pressure on the bottom of the boat created by the ball bearings:\[h^{‘} g=\frac{(4/3)\pi r^3N\rho g}{\pi r^2 N^2/10}\]where \(g\) is the acceleration due to gravity. This gives \(h^{‘}=(40r\rho/3N)\). When the bearings are taken out the boat rises and the displaced water spreads across the whole drum and the height drops to \(h^{”}\) such that \(h^{”} A=(9/10)h^{‘}A\) where \(A\) is the area of the drum’s base. So the height change when the ball bearings are loaded is:\[h^{‘} – h^{”} = \frac{4r\rho}{3N}\]Equating the difference in these two heights to the ball radius now gives: \[3N=4(\rho-1)\]Since \(\rho\) is a single digit number this show immediately that \(\rho\) is either 4 or 7 and \(n\) is either 4 or 8.

It appears that the teaser author wrongly assumed that the displaced water would end up in the annular ring of water round the boat so that:\[(9/10)\pi r^2Nh=(4/3)\pi r^3 N \rho\]This gives the change in the height of the water as \((40r\rho/27N)\) which leads to a different equation:\[27N=4(10\rho-9)\]with the single solution of \(\rho=9\) leading to \(n=12\) as the intended solution. I also made the same mistake in my initial solution.

]]>You have not explicitly shown that there is no solution with F(a,b)>999 (however obvious that may be).

Tony ]]>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from number_theory import coprime_pairs, frobenius_solve # consider the two denominations, which must be # co-prime in order to make all three-digit values for a, b in coprime_pairs(99): # their Frobenius number must be less than 100 # for all three-digit values to be possible if a * b - (a + b) < 100: # £230 can be made in only one way fs230, *r = list(frobenius_solve((a, b), 230)) if not r: # £100 must involve both denominations for fs100 in frobenius_solve((a, b), 100): if 0 in fs100: break else: s1 = '+'.join(f"{x}\u00d7(£{y})" for x, y in zip(fs100, (a, b))) s2 = '+'.join(f"{x}\u00d7(£{y})" for x, y in zip(fs230, (a, b))) print(f"Denominations £{a} and £{b} => £100 = {s1}, £230 = {s2}.") |

Here is a longer but faster solution:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
from math import gcd # using 'coin' denominations <a> and <b> return # ways of making the value <n>; if bk is True # return a result only if it is unique def make(n, a, b, bk=False): s = [] for i in range(n // b + 1): j, r = divmod(n - i * b, a) if not r: if s and bk: return None s.append((j, i)) return s # for any two co-prime 'coin' denominations <a> and <b> there # is a maximum value that cannot be made with any combination # of the coins - this is called their Frobenius number and is # given by F(a, b) = (a - 1).(b - 1) - 1; for this teaser we # need two coins whose Frobenius number is less than 100 in # order to make all three-digit values # consider the two coin denominations with Frobenius # numbers below 100 for a in range(2, 12): for b in range(a + 1, 101 // (a - 1) + 2): # which must be co-prime in order to make # all three-digit values if gcd(a, b) >= 1: # £230 can be made in only one way fs230 = make(230, a, b, True) if fs230: # £100 must not be possible or must involve both denominations fs100 = make(100, a, b) if fs100 and not any(0 in f for f in fs100): s1 = '+'.join(f"{x}\u00d7(£{y})" for x, y in zip(fs100[0], (a, b))) s2 = '+'.join(f"{x}\u00d7(£{y})" for x, y in zip(fs230[0], (a, b))) print(f"Denominations £{a} and £{b} => £100 = {s1}, £230 = {s2}") |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
for A in range(1,10): for B in range(1,10): if B == A: continue for C in range(1,10): if C in (B, A): continue for D in range(1,10): if D in (A, B, C): continue # form telephone extension numbers andrea = 1000*A + 100*B + 10*C + D bertha = 1000*A + 100*C + 10*D + B dorothy = 1000*D + 100*A + 10*B + C if andrea + bertha != dorothy: continue elizabeth = 1000*D + 100*B + 10*C + A george = 1000*C + 100*A + 10*B + D caroline = 1000*B + 100*A + 10*C + D if bertha + elizabeth != george: continue martha = 1000*C + 100*D + 10*A + B if caroline + dorothy == martha: print("Andrea's extension = ", andrea) |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
from itertools import permutations fn = lambda a, b, c, d : 1000 * a + 100 * b + 10 * c + d for a, b, c, d in permutations(range(1, 10), 4): # Andrea abcd na = fn(a, b, c, d) # Bertha acdb nb = fn(a, c, d, b) # Caroline bacd nc = fn(b, a, c, d) # Dorothy dabc nd = fn(d, a, b, c) # Elizabeth dbca ne = fn(d, b, c, a) # George cabd ng = fn(c, a, b, d) # Martha cdab nm = fn(c, d, a, b) if na + nb == nd and nb + ne == ng and nc + nd == nm: print(f"(a..d) = ({a}, {b}, {c}, {d}) -> (A..M) " f"= ({na}, {nb}, {nc}, {nd}, {ne}, {ng}, {nm}) ") |

Here is a manual solution. The three constraints can be cast as three simultaneous equations:

\[1900a+91b+109c-989d=0\tag{1}\label{1}\]\[901a+91b-890c+1009d=0\tag{2}\label{2}\]\[190a+1009b-989c+901d=0\tag{3}\label{3}\]in the four positive digits \((a, b, c, d)\). Since we have three equations in four unknowns, we can’t fully solve them but we can use them to express any three of the variables in terms of the fourth.

Subtracting equation (\ref{2}) from equation (\ref{1}) and simplifying gives:\[a=2d-c\tag{4}\label{4}\]Subtracting 10 times equation (\ref{3}) from equation (\ref{1}) and simplifying gives\[b=c-d\tag{5}\label{5}\]Finally using equations (\ref{4}) and (\ref{5}) to eliminate \(a\) and \(b\) from equation (\ref{1}) gives:

\[5c=8d\tag{6}\label{6}\]

Since \(a\), \(b\), \(c\) and \(d\) are all single non-zero digits, equation (6) leads immediately to the solution \((c, d) = (8, 5)\) and equations (\ref{4}) and (\ref{5}) complete the full solution \((a, b, c, d)=(2, 3, 8, 5)\) with Andrea’s extension number as \(2385\).

]]>Turning to cubic diophantine equations, these are notoriously difficult to solve but there has been enormous progress in recent years with elliptic curves. This paper looks promising since I believe our cubic can be converted into a solvable form and we already have one rational point to kick off the analysis. But it is hard work and I am not sure that I will have the time that understanding this paper demands.

]]>I strongly approve of your efforts to (a) prove the uniqueness of solutions and (b) correct false statements when they appear.

It has effectively been claimed (without proof) on your other site that

(m, n) = (17, 42) is the only solution in positive integers of the Diophantine equation

43m(m+1)(2m+1) = 3n(n+1)(2n+1).

I would like to know whether the claim is true.

Tony

]]>\[S(2m)=(115/100)\left\{S(2m)-S(m)\right\}\Rightarrow 3\,S(2m)=23\,0S(m)\]

On expanding the sums of squares, this becomes

\[3\,(2m)(2m+1)(4m+1)/6=23\,m(m+1)(2m+1)/6\]which can be simplified to give:\[m(2m+1)(m-17) = 0\]Since we are only interested in positive values for m, this gives \(m = 17\).

The second condition is:\[S(n)=(215/200)\left\{S(n)-S(m)\right\}\Rightarrow 3\,S(n)=43\,S(m)\]

Expanding and substituting for \(m\) now gives \[n(n+1)(2n+1)=2\times3\times5\times7\times17\times43\] Here \(2n^3<153510\), which means that \(n < 43\), and one of the terms on the left hand side must have 43 as a factor since 43 on the right hand side is a prime. Hence either \((n + 1) = 43\) or \((2n+1)=43\); substituting these values into the equation shows that only \(n=42\) provides a solution so the above equation simplifies to: \[(n-42)(2\,n^2+ 87\,n+3655)\;=\;0\]where the quadratic term might give two additional solutions. In fact it doesn't, since it has two complex conjugate roots: \(n=(1/4)(-87\pm\sqrt{21671}\,i)\) and this leaves \(n=42\) as the only real solution. The answer is hence a final payment of £1764.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from itertools import count S = lambda n: n * (n + 1) * (2 * n + 1) // 6 for m in count(1): sm, s2m = S(m), S(2 * m) if 100 * s2m == 115 * (s2m - sm): for n in count(m): sn = S(n) if 200 * sn == 215 * (sn - sm): print(f"£{n ** 2} (birthdays {m + 1}..{n})") exit() |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
from itertools import product # The segments for the digits 0..9 in # a seven segment display S = [ set('abcdef'), set('bc'), set('abdeg'), set('abcdg'), set('bcfg'), set('acdfg'), set('acdefg'), set('abc'), set('abcdefg'), set('abcfg') ] # the segments for dYsCALCULIA A = set('abcefg') I = set('bc') L = set('def') U = set('bcdef') C = set('adef') s = set('acdfg') Y = set('bcfg') d = set('bcdeg') dY = [d, Y, s, C, A, L, C, U, L, I, A] m = dict() for q in range(11): m[q] = set() # Map possible digits 'k' for each position 'l' in 'm' for l in range(11): for k in range(10): if (dY[l] & S[k]) == dY[l]: m[l].add(str(k)) # Count digits appearing as numerals def seg(x): n, u = 0, str(int(x) // 3024) d = 11 - len(u) for t in range(len(u)): dam = S[int(x[t + d])]- dY[t + d] if (S[int(u[t])] - dam) in S: n += 1 return n # How many digits are correctly shown? def ndigs(x, y, z): return sum((x == '4', y == '5', z == '1')) # Combine possible digits to possible 11-digit numbers for p in product(*(m.values())): a, b, c, d, e, f, g, h, i, j, k = p z = ''.join(p) if int(z) % 3024 == 0 and ndigs(b, c, j) == 2: if seg(z) == 3: print(f"{z}/3024 = {int(z) // 3024} gives 3 numerals") |