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.
ymersvennson
Posts: 11
Joined: Wed Aug 24, 2011 12:44 pm

Re: Imprecision in problem 47

Post by ymersvennson »

thundre wrote: 2 consecutive numbers cannot be multiples of any of the same primes.

Any group of 4 consecutive numbers must contain two numbers which are multiples of 2. (In fact, the 3-number example given in the problem does.)

So if any reader makes this error, he should be able to correct himself, as you did.

But in the way the problem is stated, it looks to me like 4 (2^2) and 2 are two different "prime factors".

It might be obvious to most people that 2^2 and 2 are not two different "prime factors". To me, not being a mathematician, it wasn't. In the problem statement it says that "644 = 2² 7 23". Here it looked to me like that the distinct prime factor is 2^2, not 2.

644 = 2² 7 23
645 = 3 5 43
646 = 2 17 19.

Seen in this way, that means that the three numbers in the example each has three distinct prime factors.

I didn't actually correct myself. I solved the different problem, which luckily for me had the same solution.

Anyway, I'm not complaining, I was just worried that other people might misunderstand the problem.
Last edited by ymersvennson on Wed Aug 24, 2011 5:24 pm, edited 1 time in total.
ymersvennson
Posts: 11
Joined: Wed Aug 24, 2011 12:44 pm

Re: Imprecision in problem 47

Post by ymersvennson »

euler wrote:(Please don't start a new topic. I've moved your posts to the thread that already existed for Problem 047.)

Did you notice the word, consecutive?
Yes, I will find the thread next time.

I did notice that.
jo_no
Posts: 1
Joined: Tue Feb 01, 2011 7:52 pm

Re: Problem 047

Post by jo_no »

Did anyone get any further solving the problem for n = 6?
"Find the first six consecutive integers to have six distinct primes factors."
I found three consecutive integers to have six distinct primes factors somewhere around 325.000.000 after 80 sec. This did not get any better even until 4.000.000.000 which already took 18 min.
Image
apdwyer51
Posts: 5
Joined: Sun Nov 27, 2011 8:46 pm

Re: Problem 047

Post by apdwyer51 »

I am working on Problem 47 which states "Find the first four consecutive integers to have four distinct prime factors." I have written a program to factor numbers and only count the ones with four distinct prime factors. I have found four consecutive integers each with four distinct prime factors, but Project Euler says that my integers are not the correct answer. So just to be clear: each integer can have any number of factors as long as there are only four distinct factors, correct? (For example, 2x2x2x3x3x5x5x7 would qualify, right?)

I know that you are not supposed to post any answers or code fragments. I guess I'll just ask whether anyone ran into a problem like this or whether there is further clarification that can help me. Any advice would be greatly appreciated.
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 047

Post by TripleM »

Yes, that would qualify (the example of 644 in the problem is there to demonstrate this).

If you've found 4 consecutive integers each having four distinct prime factors (which is easy to check by hand), and your answer isn't being accepted, then you must be missing a smaller answer.
apdwyer51
Posts: 5
Joined: Sun Nov 27, 2011 8:46 pm

Re: Problem 047

Post by apdwyer51 »

I thought so too. But my program prints every integer with four distinct prime factors and it prints when any two are consecutive. I've check everything from 210 (the first integer with four distinct primes) up to and past my answer. I guess somehow I must have missed an integer with four distinct primes, but I don't know how since the program divides every integer with every prime up to the sq rt of the integer.
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 047

Post by TripleM »

If you PM me your code I'll try to give you a small hint as to where you've gone wrong.
apdwyer51
Posts: 5
Joined: Sun Nov 27, 2011 8:46 pm

Re: Problem 047

Post by apdwyer51 »

PM?? Sorry, I'm not familiar with what that means.

By the way, I'm teaching myself to program Python and I'm afraid the code is very basic and convoluted. But I would really appreciate a hint!
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 047

Post by TripleM »

Private Message - see the PM icon under my name on the right.
nickyluck
Posts: 2
Joined: Thu May 23, 2013 8:17 pm

Problem 047

Post by nickyluck »

Hi everyone,

I tried to solve this problem and my program gives me a solution but when I checked it, it is false !
My solution has four distinct prime factors and the three consecutive numbers too. My program is supposed to give the first solution but I don't find the mistake.

Is the solution less than 200000 ?
Flood
Posts: 7
Joined: Wed May 15, 2013 4:53 pm

Re: Problem 047

Post by Flood »

Yes, it is lower than 200.000
nickyluck
Posts: 2
Joined: Thu May 23, 2013 8:17 pm

Re: Problem 047

Post by nickyluck »

Ok thank you, I found the mistake.
Svartskägg
Posts: 55
Joined: Thu Mar 29, 2012 12:55 pm
Location: Sweden

Re: Problem 047

Post by Svartskägg »

Does 'four distinct prime factors' mean exactly four or at least four?
Image
320641_5486fc18ea1dcc4e9a8f29c7677a5c19 <-- my friend key
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 047

Post by Marcus_Andrews »

Exactly four
morsnowski
Posts: 2
Joined: Tue Oct 21, 2014 2:29 pm

Re: Problem 047

Post by morsnowski »

the example given for 644 shows
644 = 2² × 7 × 23
how does that qualify as distinct primes, that's twice the number 2 or am I misunderstanding the term "distinct prime factors", to me it means I can use each number only ones to make up the target number.
Bubbler
Posts: 28
Joined: Sat Feb 23, 2013 6:12 am

Re: Problem 047

Post by Bubbler »

You count the same prime only once. So 644 has 3 distinct prime factors (2, 7, 23).
Power of each prime factor does not matter; otherwise the problem would have no solution because one number in 4 consecutive numbers must be a multiple of 4 = 2^2.
Image
morsnowski
Posts: 2
Joined: Tue Oct 21, 2014 2:29 pm

Re: Problem 047

Post by morsnowski »

Hi Bubbler, many thanks for the quick answer. Does it also mean I have to consider for example 3*3 and 3^3 as well?
Bubbler
Posts: 28
Joined: Sat Feb 23, 2013 6:12 am

Re: Problem 047

Post by Bubbler »

Yes, 3^3 can be a factor of one number in the family.
Image
meduza2
Posts: 8
Joined: Sun Oct 23, 2016 12:49 pm

Problem 047

Post by meduza2 »

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.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 047

Post by hk »

Please don't create a topic for a problem if there already exists one.
Also problems with a number less than 100 for obvious reasons should be numbered 0xx.
Image
War ruins the life and health of untold numbers of innocent children.
Post Reply