wu :: forums
« wu :: forums - 6 digit number... »

Welcome, Guest. Please Login or Register.
May 16th, 2024, 1:40am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: william wu, towr, Grimbal, SMQ, ThudnBlunder, Eigenray, Icarus)
   6 digit number...
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: 6 digit number...  (Read 2008 times)
h2
Newbie
*





   
Email

Gender: male
Posts: 6
6 digit number...  
« on: May 16th, 2005, 9:59am »
Quote Quote Modify Modify

hi,
 
Im new to the forum, it looks good tho.
Anyway, ive got a riddle that very few people have acually solved yet, and I want to know if any of you guys can solve it, here it is...
 
I'm thinking of a 6-digit number. The sum of the digits is 43. And only two of the following three statements about the number are true:
(1) it's a square number.
(2) it's a cube number.
(3) the number is under 500000.
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: 6 digit number...  
« Reply #1 on: May 16th, 2005, 10:28am »
Quote Quote Modify Modify

The easy way to solve it would be to get a computer to try all possibilities (which isn't all that much)
 
Of course a more clever approach would be more satisfying.
One thing's for sure, it's not a multiple of 3.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Sjoerd Job Postmus
Full Member
***





   


Posts: 228
Re: 6 digit number...  
« Reply #2 on: May 17th, 2005, 5:54am »
Quote Quote Modify Modify

9+9+9+9 = 36... so it's easy to see that there are a maximum of 4 9's.
There's a maximum of 5 8's.
maximum of 5 7's, because 6*7 = 42, but can't have this.
 
77778 could be possible, though.
 
But, the first digit is < 5. Let's make it a four, and distribute the 3 among the last four digits, except the 8.
 
499993. would be the largest number satisfying the constraints.
 
Now, it might be clever to instead of walking through all numbers from 100000 to 500000, to walk from crt(100000) to crt(499993)... After all, it has to be a cube root, and a square root.
 
Programmatical approach:
FOR i = 46 TO 80 {
  int i;
  IF ( has_sqrt(cube(i)) && digsum(cube(i)) == 43) {
    ECHO cube(i);
  }
}
 
defining digsum:
digsum(int i) {
  int sum = 0;
  WHILE (i) {
    sum += i MOD 10;
    i = (i - (i MOD 10)) / 10;
  }
  return sum;
}
 
of course, this's pseudocode, and would only help if you would actually be prepared to code this.
 
Of course, I'm interested in this problem, as you can see... so I'll get out my compiler now Wink...
 
In fact, a really quick approach told me that cube(i) doesn't yield any results... Too bad Cheesy Smiley
 
But, that solved the wrong riddle Wink But, it helped me with one result:
 
2) is false. Wink
 
Boredom hit again...
 
7072 < 500000
« Last Edit: May 17th, 2005, 6:01am by Sjoerd Job Postmus » IP Logged
SWF
Uberpuzzler
*****





   


Posts: 879
Re: 6 digit number...  
« Reply #3 on: May 17th, 2005, 8:27pm »
Quote Quote Modify Modify

All perfect cubes are either 0, 1, or 8 modulo 9, so the digits of a cube cannot add to 43. Thus, the number is perfect square less than 500000. The average digit must be pretty large, so start looking at the largest square less than 500000, which is 707*707 = 499849 (easy to do mentally if you know cos(45) = sqrt(.5) = .7071...).  Checking the digits shows they sum to 43 - no need to look further.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board