All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Lacsap's Triangle (Posted on 2011-03-31) Difficulty: 3 of 5
The letters A through U represent different natural numbers under 100, in the below triangle:

    
         A
        B C 
       D E F
      G H I J
     K L M N O
    P Q R S T U

Each letter is the sum of the two natural numbers just below it.

What is each letter if C > B?

  Submitted by Charlie    
Rating: 4.0000 (1 votes)
Solution: (Hide)
The two mirror-image ways are:

        98
      52  46
    32  20  26
  21  11  9  17
 14  7  4  5  12
8  6  1  3  2  10

       98
     46  52
   26  20  32
  17  9  11  21
 12  5  4  7  14
10  2  3  1  6  8

Only in the second one is C > B.

DECLARE SUB fillLevel (lvl!, offset!)
DECLARE SUB addon (lvl!)
DIM SHARED pyra(6, 6)
DIM SHARED used(99)
DIM SHARED origLvl

CLS

addon 1

SUB addon (lvl)
  IF lvl = 1 THEN strt = 1:  ELSE strt = pyra(lvl - 1, 1) + 1
  FOR new1 = strt TO 99
    IF used(new1) = 0 THEN
       used(new1) = 1
       pyra(lvl, 1) = new1

       origLvl = lvl
       IF lvl > 1 THEN
        fillLevel lvl - 1, 2
       ELSE
        addon lvl + 1
       END IF

       used(new1) = 0
       pyra(lvl, 1) = 0
    END IF
  NEXT
END SUB

SUB fillLevel (lvl, offset)
  trial = pyra(lvl + 1, offset - 1) - pyra(lvl, offset - 1)
  IF trial < 1 THEN EXIT SUB
  IF used(trial) THEN EXIT SUB
  used(trial) = 1
  pyra(lvl, offset) = trial

  IF lvl = 1 THEN
    IF origLvl = 6 THEN
     FOR row = 6 TO 1 STEP -1
      FOR col = 1 TO 7 - row
       PRINT pyra(row, col);
      NEXT
      PRINT
     NEXT
     PRINT
    ELSE
      addon origLvl + 1
    END IF
  ELSE
    fillLevel lvl - 1, offset + 1
  END IF

  used(trial) = 0
END SUB

98
52  46
32  20  26
21  11  9  17
14  7  4  5  12
8  6  1  3  2  10

98
46  52
26  20  32
17  9  11  21
12  5  4  7  14
10  2  3  1  6  8

Based on Enigma No. 1631,"Joe's Pyramid", by Bob Walker, New Scientist, 29 January 2011, page 24.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionSolutionJyqm2011-03-31 11:58:48
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information