• 61. - THE SILVER CUBES

    From David Entwistle@qnivq.ragjvfgyr@ogvagrearg.pbz to rec.puzzles on Sat Jul 12 13:28:37 2025
    From Newsgroup: rec.puzzles

    61. - THE SILVER CUBES

    From 'The Canterbury Puzzles' by Henry Earnest Dudeney.

    Master Herbert brought with him two cubes of solid silver that belonged to
    his mother. He showed that, as they measured two inches in every way, each contained eight cubic inches of silver, and therefore the two contained together sixteen cubic inches of silver. That which he wanted to know was
    - 'Could anybody give him exact dimensions for two cubes that should
    together contain just seventeen cubic inches of silver?'. Of course the
    cubes may be different sizes.
    --
    David Entwistle
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From richard@richard@cogsci.ed.ac.uk (Richard Tobin) to rec.puzzles on Sat Jul 12 23:14:47 2025
    From Newsgroup: rec.puzzles

    In article <104tnu5$25koi$1@dont-email.me>,
    David Entwistle <qnivq.ragjvfgyr@ogvagrearg.pbz> wrote:

    [Find two rational cubes whose sum is 17]

    The first solution can be found in seconds with a fairly
    straighforward program. Obviously Dudeney didn't do that.

    I had to look up how you might go about it. It turns out

    (1) There's a solution with small numerators and denominators, but
    one of them is negative;

    (2) There's a recurrence relation that given one solution produces
    another.

    Applying (2) to (1) gives a solution in positive rationals.

    So an easier puzzle is to find (1).

    The recurrence relation can be found here, but appears to have a typo
    (-z^3 for -y^3):

    https://web.archive.org/web/20130721093115/http://www.math.niu.edu/~rusin/known-math/95/numthy.cub

    -- Richard
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Entwistle@qnivq.ragjvfgyr@ogvagrearg.pbz to rec.puzzles on Sun Jul 13 08:53:06 2025
    From Newsgroup: rec.puzzles

    On Sat, 12 Jul 2025 23:14:47 -0000 (UTC), Richard Tobin wrote:

    The first solution can be found in seconds with a fairly straighforward program. Obviously Dudeney didn't do that.

    No, in the introduction to the same book the author discusses the non-
    trivial factors of the sequence of (base 10) numbers comprised just of
    one's: 1, 11, 111, 1111....

    He explains that the number comprising seventeen ones has two factors and lists them, but explains that no one knows if the number comprising
    nineteen ones has a non-trivial divisor...

    The later footnote included with the solution for a related problem says:

    "Mr Oscar Hoppe, of New York, informs me that, after reading my statement
    in the Introduction, he was led to investigate the case of n = 19, and
    after long and tedious work he succeeded in proving the number to be
    prime. He submitted his proof to the London Mathematical Society, and a specially appointed committee of that body accepted the proof as final and conclusive. He refers me to the Proceedings of the Society for 14th
    February 1918".

    Well done Mr Oscar Hoppe.
    --
    David Entwistle
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From richard@richard@cogsci.ed.ac.uk (Richard Tobin) to rec.puzzles on Tue Jul 15 00:32:44 2025
    From Newsgroup: rec.puzzles

    In article <104uq97$1b42r$1@artemis.inf.ed.ac.uk>,
    Richard Tobin <richard@cogsci.ed.ac.uk> wrote:
    I had to look up how you might go about it. It turns out

    (1) There's a solution with small numerators and denominators, but
    one of them is negative;

    (2) There's a recurrence relation that given one solution produces
    another.

    Applying (2) to (1) gives a solution in positive rationals.

    So an easier puzzle is to find (1).

    Spoiler
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .

    The simple but invalid solution is (18/7)^3 + (-1/7)^3 = 17

    Given (x/z)^3 +(y/z)^3 = a, the recurrence relation gives a new triple
    x,y,z:

    x(x^3 + 2y^3)
    -y(2x^3 + y^3)
    z(x^3 - y^3)

    Applying it to 18,-1,7 gives the desired solution:

    (11663/40831)^3 + (104940/40831)^3 = 17

    which can also be find in a reasonable time by a computer program.

    Applying the relation again gives another solution with a negative
    cube, but applying it a third time gives another valid solution:

    (213911660725112665205915686283667768508559220489375013086586592912683129002901680/85663575208595989523064839018954307150548744631241583862215046886695340878091183)^3 +
    (96489450149187273559455691876125510797936653514955100397233219218908577035631359/85663575208595989523064839018954307150548744631241583862215046886695340878091183)^3 = 17

    -- Richard
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Entwistle@qnivq.ragjvfgyr@ogvagrearg.pbz to rec.puzzles on Tue Jul 15 08:19:38 2025
    From Newsgroup: rec.puzzles

    On Sat, 12 Jul 2025 23:14:47 -0000 (UTC), Richard Tobin wrote:

    The first solution can be found in seconds with a fairly straighforward program. Obviously Dudeney didn't do that.

    I tried the programmatic approach and didn't find a solution in seconds,
    nor even minutes - I was probably doing a lot of unnecessary looping. I've looked at the solution and the common denominator has five digits.

    The other path looks to be the way to go.
    --
    David Entwistle
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From ilan_no_spew@ilan_no_spew@hotmail.com (IlanMayer) to rec.puzzles on Sat Jul 19 02:46:13 2025
    From Newsgroup: rec.puzzles

    On Tue, 15 Jul 2025 8:19:38 +0000, David Entwistle wrote:

    On Sat, 12 Jul 2025 23:14:47 -0000 (UTC), Richard Tobin wrote:

    The first solution can be found in seconds with a fairly straighforward
    program. Obviously Dudeney didn't do that.

    I tried the programmatic approach and didn't find a solution in seconds,
    nor even minutes - I was probably doing a lot of unnecessary looping.
    I've
    looked at the solution and the common denominator has five digits.

    The other path looks to be the way to go.

    The C# program below finds the solution in under a minute:

    using System;

    namespace SumOfCubes
    {
    class SumOfCubes
    {
    private const long MAX = 200000;

    static void Main(string[] args)
    {
    if (args.Length == 1 && long.TryParse(args[0], out long
    number) && number > 0)
    {
    FindCubes(number);
    }
    else
    {
    Console.WriteLine("Usage: SumOfCubes <number>");
    }
    }

    private static void FindCubes(long number)
    {
    double third = 1.0 / 3.0;
    bool found = false;

    for (long a = 1; a < MAX && !found; a++)
    {
    long a3 = a * a * a;
    for (long b = a; b < MAX && !found; b++)
    {
    long sum = a3 + b * b * b;
    long c3 = sum / number;
    if (c3 * number == sum)
    {
    long c = (long)Math.Round(Math.Pow(c3, third));
    if (c * c * c == c3 && GCD(a, c) == 1 && GCD(b,
    c) == 1)
    {
    Console.WriteLine($"({a} / {c})^3 + ({b} /
    {c})^3 = {number}");
    found = true;
    }
    }
    }
    }
    }

    private static long GCD(long number1, long number2)
    {
    long remainder;

    while (number2 != 0)
    {
    remainder = number1 % number2;
    number1 = number2;
    number2 = remainder;
    }

    return number1;
    }
    }
    }

    --
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From richard@richard@cogsci.ed.ac.uk (Richard Tobin) to rec.puzzles on Sat Jul 19 14:22:06 2025
    From Newsgroup: rec.puzzles

    In article <da38f2628fe7919ad1a2f3495eeb2483@www.novabbs.com>,
    IlanMayer <ilan_no_spew@hotmail.com> wrote:
    The C# program below finds the solution in under a minute:

    Here is a C program. You can choose whether to use floating point
    (which should be big and accurate enough) but it you don't you will
    need to check whether you have the flsll function.

    /* Find rationals a/d and b/d the sum of whose cubes is 17 */

    #include <stdio.h>
    #include <stdlib.h>
    #include <strings.h>
    #include <inttypes.h>
    #include <math.h>

    /* integer cube root, return -1 if not a cube */
    long long int cuberoot(long long c)
    {
    #ifdef USE_FLOAT
    long long a = cbrt(c);
    #else
    int n = flsll(c);
    long long a = 1ll << ((n+2)/3); /* a good first approximation */

    while(c/a/a < a)
    a = (2*a+c/a/a) / 3;
    #endif
    return a*a*a == c ? a : -1;
    }

    int main(int argc, char **argv)
    {
    int n = (argc > 1 ? atoi(argv[1]) : 17);
    long long denom, denom3n, num1, num2, num13, num23;

    for(denom=1; denom<1000000; denom++)
    {
    if(denom % 1000 == 0)
    printf("(%lld)\n", denom);

    denom3n = denom * denom * denom * n;

    for(num1=1; ; num1++)
    {
    num13 = num1 * num1 * num1;
    num23 = denom3n - num13;

    if(num23 < num13)
    break;

    num2 = cuberoot(num23);

    if(num2 != -1)
    {
    printf("%lld^3 + %lld^3 = %d x %lld^3\n",
    num1, num2, n, denom);
    return 0;
    }
    }
    }
    }
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Entwistle@qnivq.ragjvfgyr@ogvagrearg.pbz to rec.puzzles on Sun Jul 20 08:35:13 2025
    From Newsgroup: rec.puzzles

    On Sat, 19 Jul 2025 14:22:06 -0000 (UTC), Richard Tobin wrote:

    In article <da38f2628fe7919ad1a2f3495eeb2483@www.novabbs.com>,
    IlanMayer <ilan_no_spew@hotmail.com> wrote:
    The C# program below finds the solution in under a minute:

    Here is a C program.

    Well done both. Both programs identify the solution given by Dudeney. Just
    how Dudeney arrived at that solution, in 1907, is another puzzle.
    --
    David Entwistle
    --- Synchronet 3.21a-Linux NewsLink 1.2