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

Home > Just Math
Another 2006 Problem (Posted on 2006-09-30) Difficulty: 2 of 5
Determine the total number of positive integer solutions of:

2/x + 3/y = 1/2006

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
A Computer Assisted look ??? | Comment 6 of 9 |
Where have I erred?

I had originally decided that there was only one solution but I decided to test it against a computer program.
I gave up on Qbas, it was too slow (by nature of how it works).

I wrote a C++, listing below to test my thoughts, especially after seeing 27 and 72 being mentioned as the number of solution pairings.

Well, I transposed the given equation to:
  2006*(2*y + 3*x) = x*y
Then I set out to test all x against all y with values from 1 to 100000.

Within that range I exhausted 104 pairs; it took something like 10 to 15 mins to run that course.

The last result [104]was:
       x=99068, y=6272 and the lhs=rhs=621354496.
Test 82 had x=58637 with y=6460.
Test 63 was x=59516 and y=6453.
Test q,  x = y = 10030.   [10030 / 2006 =5].

Now I did recognise the factors of 2006 I haven't tested 104 to see how those factors may/not prevail.
But, unless KS has somehow assumed or overlooked their
importance by not mentioning them as delimiters, I suggest that we have infinite solutions.
---------------------------------------
Program:
I doubt that there is anything hugely different here that an exponent of a different
programming language should not readily understand.
--------------------------
#include <stdio.h>
#include <conio.h>

// int is a poor declaration as it only allows values up to +32767
float count;
float x,y;
float a,b,m,n;
int main()
{
   clrscr();
   count = 0;
   for (x=1;x<=100000;x++)   
                        //Encasing the next For loop as {...} has no
                             consequence that I can tell.

    for (y=1;y<=100000;y++)
    {
    //Represents Eqn 4012y + 6018x = xy
        a = 4012 * y;
        b = 6018 * x;
        m= a + b;
        n = x * y;
    //Evaluate: Does LHS = RHS?
        if (m==n)
        {
            count++;
            printf("\n\r %.0f %.0f %.0f %.0f %.0f",count,x,y, m,n);
            // The quote string displays numbers
                without following .00... places

        }
    }

   printf("\n\n Press Any Key to Finish");
   getch();
   return(0);
}

Note: For program check, The listing has not been altered other that converting comments to italics.


  Posted by brianjn on 2006-10-01 02:15:23
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