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

Home > Numbers
Magic 8's (Posted on 2006-09-18) Difficulty: 4 of 5
There is a number which has 8 divisors including, 8, itself, and 1. There is also a number which has 18 divisors, including 18, itself and 1. The difference between these numbers is 28. What are the two numbers?

No Solution Yet Submitted by joshua    
Rating: 4.0000 (2 votes)

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

In order for a number to have n factors, its prime factorization, p1^k1 * p2^k2 * ..., must be such that (k1+1) * (k2+1) * ... = n, as, in forming a factor, there is a choice of zero through k1 occurrences of the first prime, zero through k2 occurrences of the second, etc.

In the case of needing 8 factors, including 2^3=8, the possibilities are 2^7 or 2^3 * p1. The first, 2^7=128, is eliminated by the fact that neither 128+28=156 nor 128-28=100 meets the criteria for the second number: The former is not divisible by 18, and has only 12 factors; the latter is also not divisible by 18 and has only 9 factors. So the first number is 8 * p1.

In order for the second number to have 18 factors, its prime factorization could be of the form p2^17, or p2^2*p3^5 or p2*p3^8 or p2*p3^2*p4^2. But it must also be divisible by 18=2*3^2, so at least the two primes, 2 and 3, are involved.

2^2*3^5 = 972; 28 less is 944, which has 10 factors rather than 8
               28 more is 1000, which has 16 rather than 8.
              
3^2*2^5 = 288; 28 less is 260, which is not divisible by 8 and has 12 factors
             ; 28 more is 316, which is not divisible by 8 and has 6 factors.
            
2*3^8 = 13122; 28 less is 13,094, which is not divisible by 8 and has 4 factors
             ; 28 more is 13,150, which is not divisible by 8 and has 12 factors.
            
We can't reverse the positions of the 2 and the 3 in this form (i.e., have 3*2^8) as the power of 3 must be at least 2.

That leaves 2*3^2*p4^2 or p2*2^2*3^2, as the second number. However, since the first number is a multiple of 8, when we add or subtract 28 to/from it, that second number must be a multiple of 4, so the 2 must be squared, and the form is p2*2^2*3^2 = 36*p2.

Combining the above algebraically, we determine that 2*p1 differs from 9*p2 by 7. Also, p2 can't be 2 or 3 and p1 can't be 2, in order to meet the prime-factorization forms of the numbers. Trying the simplest p2 = 5, results in p1 being either (45+7)/2=26 or (45-7)/2=19. The former is not prime, but 19 is.

Remember the first number is 8*p1 and the second is 36*p2, so p2=5 means the second number is 5*36=180, and p1=19 gives the first number as 152. So this is a solution.

But we can try other numbers besides 5 as p2.

Here's a list of the first 35 successful results:

  p2  first num second number
   5     152     180
  11     424     396
  17     584     612
  19     712     684
  23     856     828
  29    1016    1044
  37    1304    1332
  41    1448    1476
  43    1576    1548
  59    2152    2124
  61    2168    2196
  79    2872    2844
  89    3176    3204
  97    3464    3492
 103    3736    3708
 109    3896    3924
 131    4744    4716
 137    4904    4932
 151    5464    5436
 179    6472    6444
 181    6488    6516
 191    6904    6876
 197    7064    7092
 211    7624    7596
 257    9224    9252
 263    9496    9468
 271    9784    9756
 283   10216   10188
 317   11384   11412
 331   11944   11916
 349   12536   12564
 359   12952   12924
 379   13672   13644
 389   13976   14004
 397   14264   14292
 
 10 P2=3
 20 while Ct<35
 30   P2=nxtprm(P2)
 40   P1=(9*P2-7)//2
 50   if P1=int(P1) then if nxtprm(P1-1)=P1 then if P1<>2 then print using(6,0),P2,8*P1,8*P1+28:Ct=Ct+1
 60   P1=(9*P2+7)//2
 70   if P1=int(P1) then if nxtprm(P1-1)=P1 then if P1<>2 then print using(6,0),P2,8*P1,8*P1-28:Ct=Ct+1
100 wend
 

  Posted by Charlie on 2006-09-18 15:51:46
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 (12)
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