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

Home > Just Math
Mean of pairs (Posted on 2025-04-14) Difficulty: 3 of 5
There exists positive integers m and n such that 2/m + 3/n = 1/16. Find the mean of the set of integers which contains all possible values of m and n.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 1 of 3
I started with a brute force program and once large enough numbers were tested, the result appeared to be 244.6
But here is an analytic approach:
2/m + 3/n = 1/16
32n + 48m - nm = 0

This looks like a job for Simon's Favorite Factoring Trick
(32 - m)n + 48(m - 32) = -48*32
(48 - n)(32 - m) = 1536

The factors of 1536 are (+ or -)
1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1536

factors ;  (n,m)
(1,1536); (47, -1504) ; reject since m < 0
(-1,-1536); (49, 1568); accept
(2,768); (46,-736) ; reject since m < 0
(-2,-768); (50,800); accept

Time for a program to automate going through all the possibilities.

(48 - n)(32 - m) = 1536
   (n,m)
(49, 1568)
(50, 800)
(51, 544)
(52, 416)
(54, 288)
(56, 224)
(60, 160)
(64, 128)
(72, 96)
(80, 80)
(96, 64)
(112, 56)
(144, 48)
(176, 44)
(240, 40)
(304, 38)
(432, 36)
(560, 35)
(816, 34)
(1584, 33)

And the mean is indeed 244.6
-------------------
factors = [1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1536]
revfacs = [1536, 768, 512, 384, 256, 192, 128, 96, 64, 48, 32, 24, 16, 12, 8, 6, 4, 3, 2, 1]

nmlist = []
means = []
for index, value in enumerate(factors):
    n = 48 - factors[index]
    m = 32 - revfacs[index]
    if n>0 and m>0:
        nmlist.append([n,m])
        means.append((n+m)/2)
    n = 48 + factors[index]
    m = 32 + revfacs[index]
    if n>0 and m>0:
        nmlist.append([n,m])
        means.append((n+m)/2)
print(nmlist)
print(sum(means) / len(means))

  Posted by Larry on 2025-04-14 08:36:54
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 (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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