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

Home > Numbers
Different Sums (Posted on 2004-07-22) Difficulty: 3 of 5
There are 40 ways to make sums of three distinct positive integers total 25. (1+2+22 is such a sum, but 1+12+12 and 1+2+3+19 are not.)

How many different ways can three distinct positive integers sum to 1000?

See The Solution Submitted by Brian Smith    
Rating: 3.2500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(3): Curious second differences | Comment 13 of 17 |
(In reply to re(2): Curious second differences by Old Original Oskar!)

I have verified algebraically that your formula is completely equivalent to the ones I gave in my previous posting.

Here is a fast QBASIC program that numerically verifies your formula for any long integer:

DEFLNG A-Z
PRINT "Enter N and press ENTER": INPUT N: PRINT " N ="; N
total = 0
FOR a = 1 TO (N \ 3) - 1
b = a + 1
c = N - a - b
        WHILE c > b
                total = total + 1
                b = b + 1
                c = N - a - b
        WEND
NEXT
K = N \ 6
L = N - 6 * K
M = 0: IF L = 0 THEN M = 1
PRINT total, 3 * K * K + (L - 3) * K + M

Edited on July 24, 2004, 1:44 am
  Posted by Richard on 2004-07-23 21:00:08

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 (5)
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