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

 Six Digits = Triangle + Triangle (Posted on 2008-08-17)
There are three 6 digit numbers with the following properties applicable to each:

1. All digits are unique.
2. The first three digits ABC form a triangular number as do the latter three, DEF; both are multiples of 3.
3. The digital root/sum of the first triangular number is greater than that of the second.
4. Three consecutive digits form the difference of the triangular numbers, either being ascending or descending.

Identify the three 6 digit numbers.

 See The Solution Submitted by brianjn Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution (spoiler) | Comment 1 of 3

There are 17 triangular numbers that are divisible by 3 and each consisting of 3 different digits:

`105           6120           3153           9210           3231           6276           6351           9378           9435           3465           6528           6561           3630           9741           3780           6861           6903           3`

shown here with the digital root of each.

Combining those as specified does produce three 6-digit numbers:

`153276         9  6         123465120         6  3         345780435         6  3         345`

where here the 6-digit number is shown with the digital roots of its two components and the difference between the two 3-digit triangular numbers.

DEFDBL A-Z
DIM tri(100), digRt(100)
triN = 1: addN = 1
DO
IF triN > 100 AND triN < 1000 THEN
tst\$ = LTRIM\$(STR\$(triN))
good = 1
FOR i = 1 TO 2
IF INSTR(i + 1, tst\$, MID\$(tst\$, i, 1)) > 0 THEN good = 0: EXIT FOR
NEXT
IF triN MOD 3 <> 0 THEN good = 0
IF good THEN
triCt = triCt + 1: tri(triCt) = triN
DO
sum = 0
FOR i = 1 TO LEN(tst\$)
sum = sum + VAL(MID\$(tst\$, i, 1))
NEXT
tst\$ = LTRIM\$(STR\$(sum))
LOOP UNTIL LEN(tst\$) = 1
digRt(triCt) = VAL(tst\$)
PRINT tri(triCt), digRt(triCt)
END IF
END IF
LOOP UNTIL triN > 999
PRINT triCt

FOR i = 1 TO triCt
FOR j = 1 TO triCt
IF i <> j THEN
IF digRt(i) > digRt(j) THEN
whole\$ = LTRIM\$(STR\$(tri(i))) + LTRIM\$(STR\$(tri(j)))
good = 1
FOR ix = 1 TO 5
IF INSTR(ix + 1, whole\$, MID\$(whole\$, ix, 1)) > 0 THEN good = 0: EXIT FOR
NEXT
IF good THEN
diff\$ = LTRIM\$(STR\$(ABS(tri(i) - tri(j))))
dig1 = VAL(MID\$(diff\$, 1, 1))
dig2 = VAL(MID\$(diff\$, 2, 1))
dig3 = VAL(MID\$(diff\$, 3, 1))
IF dig2 - dig1 = dig3 - dig2 AND ABS(dig2 - dig1) = 1 THEN
PRINT whole\$, digRt(i); digRt(j), diff\$
END IF
END IF
END IF
END IF
NEXT
NEXT

Edited on August 17, 2008, 7:00 pm
 Posted by Charlie on 2008-08-17 18:58:46

 Search: Search body:
Forums (0)