Tagged: by: Derek Emley Toggle Comment Threads | Keyboard Shortcuts

  • Unknown's avatar

    Jim Randell 8:44 am on 12 June 2026 Permalink | Reply
    Tags: by: Derek Emley   

    Teaser 2421: [Silver pennies] 

    From The Sunday Times, 15th February 2009 [link]

    The winning team at a seven-a-side football tournament was awarded a four-figure perfect square number of silver pennies. This was shared as equally as possible between the players, the remaining pennies being placed in the Benevolent Fund. The same procedure, with an equal prize, was followed for the cricket and rugby league tournaments. In each case, more than one penny went into the fund. And one sport’s contribution was the sum of the other two.

    How much did the wicket keeper win?

    The prize for the football tournament is split between 7 players. For the cricket team the prize is split between 11 players (including the wicket keeper), and for the rugby league team the prize is split between 13 players.

    This puzzle was originally published with no title.

    [teaser2421]

     
    • Jim Randell's avatar

      Jim Randell 8:44 am on 12 June 2026 Permalink | Reply

      We are to assume that the in each case the entire quantity of pennies is evenly distributed to the 7 players in the football team, the 11 players in the cricket team, and the 13 players in the rugby league team. And the that wicket keeper is part of the cricket team (and does not play in any of the other teams).

      If we have 3 numbers, and one of them is the sum of the other two, then by adding them all together we get twice the largest number.

      This Python program runs in 76ms. (Internal runtime is 140µs).

      from enigma import (powers, div, printf)
      
      # sizes of the groups
      teams = (7, 11, 13)
      
      # consider 4-digit squares
      for n in powers(32, 99, 2):
        rs = tuple(n % k for k in teams)
        if any(r < 2 for r in rs): continue
        if div(sum(rs), 2) not in rs: continue
        # output solution
        printf("n={n}: {rs}")
        for k in teams:
          (d, r) = divmod(n, k)
          printf("-> /{k} = {d} rem {r}")
        printf()
      

      Solution: The wicket keeper won 820 pennies.

      In each case the prize was 9025 pennies.

      The football team (7 players) won 1289 pennies each, with the remaining 2 pennies going to the Benevolent Fund.

      The cricket team (11 players) won 820 pennies each, with the remaining 5 pennies going to the Benevolent Fund.

      The rugby league team (13 players) won 694 pennies each, with the remaining 3 pennies going to the Benevolent Fund.

      So the Benevolent Fund received 10 of the 27075 pennies (= 0.33% of the total amount).

      Like

    • Ruud's avatar

      Ruud 11:06 am on 12 June 2026 Permalink | Reply

      for total in (i * i for i in range(32, 100)):
          if all(total % n > 1 for n in (7, 11, 13)) and any(x == y + z for x, y, z in istr.permutations(total % n for n in (7, 11, 13))):
              print(total // 11)
      

      Like

  • Unknown's avatar

    Jim Randell 10:05 am on 27 January 2026 Permalink | Reply
    Tags: by: Derek Emley   

    Teaser 2415: [Double shift] 

    From The Sunday Times, 4th January 2009 [link]

    I have written down a large number in which no digit occurs more than twice. If I were to move the last digit of the number from the end to the front of the number, then the effect would be to double the number. If I repeated the process with the new number, then the effect would be to double it again. And if I repeated the process again, the effect would be to double the number yet again.

    What is the number that I have written down?

    This puzzle was originally published with no title.

    [teaser2415]

     
    • Jim Randell's avatar

      Jim Randell 10:06 am on 27 January 2026 Permalink | Reply

      If we suppose the original number n is of the form:

      n = 10a + z
      where z is the final digit, and a is a k-digit number

      Then moving the final digit to the front gives us:

      2n = (10^k)z + a

      From which we derive that a is a k-digit number, such that:

      19a = (10^k − 2)z

      If the number contains no digit more than twice, then the longest the number can be is 20 digits long, and so we can consider k up to 19.

      This Python program runs in 70ms. (Internal runtime is 719µs).

      from enigma import (irange, div, nsplit, rotate, zip_eq, seq2str, printf)
      
      # check a candidate number <n> (with digits <ds>)
      def check(n, ds):
        # check no digit occurs more than twice
        if any(ds.count(x) > 2 for x in set(ds)): return
        # record shifts that result in doublings
        ns = [n]
        # collect doubling sequences
        while True:
          n *= 2
          ds = rotate(ds, -1)
          if not zip_eq(ds, nsplit(n)): break
          ns.append(n)
        return ns
      
      # look for up to 19 digits prefixes
      for k in irange(1, 19):
        x = 10**k - 2
        # consider possible final digits
        for z in irange(1, 9):
          a = div(x * z, 19)
          if a is None: continue
          n = 10*a + z
          ds = nsplit(n)
          if len(ds) != k + 1: continue
          ns = check(n, ds)
          if ns and len(ns) >= 4:
            printf("{ns}", ns=seq2str(ns, sep=" -> ", enc=""))
      

      Solution: The number is: 105263157894736842.

      The number is 18 digits long, and uses each digit twice except 0 and 9 (which are used once each).

      Shifting the final digit to the front multiple times we get:

      105263157894736842 = n
      210526315789473684 = n × 2
      421052631578947368 = n × 4
      842105263157894736 = n × 8

      A run of 4 is the longest run we can get in base 10 (as n × 16 will not have the same number of digits as n), but there is another run of 3 we can make:

      157894736842105263 = n
      315789473684210526 = n × 2
      631578947368421052 = n × 4

      These numbers are the repetends of fractions of the form k / 19.

      Like

    • Frits's avatar

      Frits 8:51 am on 31 January 2026 Permalink | Reply

      '''
        n = xbcd where x is a k-digit number and b,c and d are digits 
      2.n = dxbc
      4.n = cdxb
      8.n = bcdx with x, b and c all even
      
      8.n = bcdx also has k+3 digits so b = 8 and first digit of x = 1
         --> c = 4 (not 9) and last digit of x must be 6
             d = 2 (as 2.n must be 2.....)
             
      n = 1....6842      
      
        n = xbcd = 1000.x + bcd  (x has k digits)
      8.n = bcdx = 10^k . bcd + x
      
      8000.x + 8.bcd = 10^k . bcd + x
      7999.x = 19.421.x = (10^k - 8).842
      19.x = 2.(10^k - 8)
      '''
            
      for k in range(2, 18):  
        x, r = divmod(2 * (10**k - 8), 19)
        if r: continue
        n = str(x) + "842"
        # no digit occurs more than twice
        if all(n.count(str(i)) <= 2 for i in range(10)): 
          print("answer method 1:", n)
        
      # in order for 2 * (10**k - 8) % 19 = 0 we must have
      # 2 * 10**k % 19 = 16 
      # 2 * 10**k = 19.10**(k - 1) + 10**(k - 1)
      # so 10**(k - 1) % 19 = 16
      
      # 10**(k - 1) % 19 follows a logical pattern
      k = 2
      a = 10**(k - 1) % 19
      while a != 16: 
        a = (a + 19 * (a % 2)) // 2
        k += 1
      
      n = str(2 * (10**k - 8) // 19) + "842"
      # no digit occurs more than twice
      if all(n.count(str(i)) <= 2 for i in range(10)): 
        print("answer method 2:", n)
      

      Like

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Design a site like this with WordPress.com
Get started