Problem 047

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
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.

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

meduza2 wrote:It states that 644, 645, 646 have three distinct prime factors, that is wrong because 2 is a prime factor of 644 and 646.

Can anybody clarify the problem.
644 = 2² × 7 × 23
645 = 3 × 5 × 43
646 = 2 × 17 × 19
Each of these three numbers has three distinct prime factors.
Image
War ruins the life and health of untold numbers of innocent children.
meduza2
Posts: 8
Joined: Sun Oct 23, 2016 12:49 pm

Re: Problem 047

Post by meduza2 »

hk wrote:Each of these three numbers has three distinct prime factors.
As I said it's wrong, 644 and 646 have a common prime factor. Or your use a non-standard definition for "prime factor".
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

The fact that 644 and 646 have a common prime factor is totally irrelevant.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
sjhillier
Administrator
Posts: 561
Joined: Sun Aug 17, 2014 4:59 pm
Location: Birmingham, UK
Contact:

Re: Problem 047

Post by sjhillier »

hk wrote: Each of these three numbers has three distinct prime factors.
hk has now answered your question twice, and note he has already answered exactly the same question earlier in the topic, see this post. I'm sure at least one of these answers will help if you think about it carefully.
meduza2
Posts: 8
Joined: Sun Oct 23, 2016 12:49 pm

Re: Problem 047

Post by meduza2 »

Now I understand. But I still think the original text is totally ambiguous. Let $a_1,\ldots,a_4$ be the asked consecutive four numbers, the problem can be understood as:

1) there are set of 16 distinct primes such that every $a_i$ have exactly 4 prime factors from the set, and $a_i$ don't have common prime factors with $a_j$, $i\neq j$.

2) there are set of 4 distinct primes such that every $a_i$ have prime factors from the set, and don't have other prime factors.

3) there are set of 4..16 prime factors, such that every $a_i$ have exactly 4 prime factors from the set, and don't have other prime factors.

4) there are set of 4 distinct primes such that every $a_i$ have exactly 4 prime factors from the set, and don't have other prime factors.

The problem asks... hm... guess what it asks from the original text. As I see frm the topic, not only me find this ambiguous. Do you consider to editing the problem for future solvers?
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

If there is consensus for a better wording that can always be done.
However, the wording should stay short without unnecessary longwindedness.

Would it help if we changed:
"Find the first four consecutive integers to have four distinct prime factors."
into
"Find the first four consecutive integers to have four distinct prime factors each."?
Image
War ruins the life and health of untold numbers of innocent children.
meduza2
Posts: 8
Joined: Sun Oct 23, 2016 12:49 pm

Re: Problem 047

Post by meduza2 »

Advice: between unambiguous and short always choose unambiguous. It's not a telegram, it's a math and programming problem.

Find the first four consecutive integers such that each have exactly 4 distinct prime factors, the integers can have common prime factors.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

Math learns us: from four consecutive numbers there are always 2 having a factor 2 in common.
So "the integers can have common prime factors" is superfluous and unnecessarily longwinded. This doesn't resolve any ambiguity that cannot be resolved by a little thinking.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
Animus
Administrator
Posts: 1987
Joined: Sat Aug 16, 2014 1:23 pm

Re: Problem 047

Post by Animus »

hk wrote:Would it help if we changed:
"Find the first four consecutive integers to have four distinct prime factors."
into
"Find the first four consecutive integers to have four distinct prime factors each."?
I think that would be a good idea, making the condition asked for very clear.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

Done.
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply