Page 1 of 1
Problem 581
Posted: Tue Jan 10, 2017 8:23 pm
by Oliver1978
The problem and its description are pretty much straight forward. A brute-force algorithm may work for p-smooth numbers with small p. I've tried something different and tried several sets of primes [2, 3...]. Following the description of this problem, might I ask if I'm right with the following: the sum of Hamming numbers being 3 digits long ending with ..1; also for 7-smooth numbers the result is 4 digits long ending with ..3; and furthermore for 11-smooth numbers the result is 5 digits long and ending with ..91.
Is this correct so far?
Re: Problem 581
Posted: Tue Jan 10, 2017 11:12 pm
by v6ph1
Yes - it is.
Re: Problem 581
Posted: Sat Mar 25, 2017 9:31 pm
by mdean
Does this solution really fit into a 64-bit integer? Because I foresee having to test some huge numbers for this problem. For now, I'll start small and work my way up.
Re: Problem 581
Posted: Sat Mar 25, 2017 10:27 pm
by v6ph1
Yes - The total fits into 42 bit.
The intermediates of your algorithm should also fit. - If not, think of it.
Re: Problem 581
Posted: Mon May 08, 2017 6:29 pm
by AdamCapo
Hello,
I was hoping someone could help me out by giving me some more test cases to help me see where I am going wrong.
From another site, I was able to get the solutions for 2,3,5,7,11,13 and 17 smooth numbers (snipped by moderator) and my code works fine for all them. However, somewhere between the 17-smooth solution and the 47-smooth solution there is a problem in my code that I can't seem to figure out. Based on the previous posts I don't believe it is a memory issue, but I could be wrong.
Thanks!
Re: Problem 581
Posted: Mon May 08, 2017 7:54 pm
by hk
This forum isn't meant to provide (partial) answers to problems.
Re: Problem 581
Posted: Mon May 08, 2017 8:11 pm
by v6ph1
@AdamCapo:
The solutions, you provided works all with 32Bit Integers.
But numbers which are smooth to a higher prime need 64Bit.
Re: Problem 581
Posted: Tue May 09, 2017 2:45 pm
by AdamCapo
I apologize for asking for information that wasn't allowed. I had seen in other parts of the forum people asking/receiving test values, so I thought I was OK.
As for my error, it turned out to be a basic misunderstanding of how to use a theorem. Since my limit was so high, it didn't cause an issue for lower p-smooth numbers, but became apparent higher up.
Re: Problem 581
Posted: Tue May 09, 2017 3:30 pm
by hk
AdamCapo wrote: Tue May 09, 2017 2:45 pm
I apologize for asking for information that wasn't allowed. I had seen in other parts of the forum people asking/receiving test values, so I thought I was OK.
Next time please read the content of the pink box at the top of the page.