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?
Problem 581
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
- Oliver1978
- Posts: 166
- Joined: Sat Nov 22, 2014 9:13 pm
- Location: Erfurt, Germany
-
mdean
- Posts: 206
- Joined: Tue Aug 02, 2011 2:05 am
Re: Problem 581
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.

-
v6ph1
- Posts: 134
- Joined: Mon Aug 25, 2014 7:14 pm
Re: Problem 581
Yes - The total fits into 42 bit.
The intermediates of your algorithm should also fit. - If not, think of it.
The intermediates of your algorithm should also fit. - If not, think of it.

-
AdamCapo
- Posts: 2
- Joined: Mon May 08, 2017 6:23 pm
Re: Problem 581
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!
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!
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 581
This forum isn't meant to provide (partial) answers to problems.

War ruins the life and health of untold numbers of innocent children.
-
v6ph1
- Posts: 134
- Joined: Mon Aug 25, 2014 7:14 pm
Re: Problem 581
@AdamCapo:
The solutions, you provided works all with 32Bit Integers.
But numbers which are smooth to a higher prime need 64Bit.
The solutions, you provided works all with 32Bit Integers.
But numbers which are smooth to a higher prime need 64Bit.

-
AdamCapo
- Posts: 2
- Joined: Mon May 08, 2017 6:23 pm
Re: Problem 581
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.
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.
- hk
- Administrator
- Posts: 12832
- Joined: Sun Mar 26, 2006 10:34 am
- Location: Haren, Netherlands
Re: Problem 581
Next time please read the content of the pink box at the top of the page.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.

War ruins the life and health of untold numbers of innocent children.