Problem 643

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.
Post Reply
vapor
Posts: 2
Joined: Sun Dec 31, 2017 3:02 pm

Problem 643

Post by vapor » Sat Nov 17, 2018 7:22 pm

What does g(100)=1031 mean in this problem?
Update: It seems that setting p<q gives the correct result.
Last edited by vapor on Sat Nov 17, 2018 7:27 pm, edited 1 time in total.
Image

User avatar
mscha
Posts: 6
Joined: Sat Jan 21, 2017 9:55 pm

Re: Problem 643

Post by mscha » Sat Nov 17, 2018 7:25 pm

I get f(10²) = 1037, not 1031, given the definition in the problem.
If I change the definition to require 1 ≤ p < q ≤ n instead of 1 ≤ p ≤ q ≤ n, then I get 1031. (That excludes (2,2), (4,4), (8,8) ... (64,64).)
So which is wrong, the definition or the example?
Image

MHealy
Posts: 35
Joined: Sat Nov 17, 2012 11:32 pm

Re: Problem 643

Post by MHealy » Sat Nov 17, 2018 7:34 pm

mscha wrote:
Sat Nov 17, 2018 7:25 pm

So which is wrong, the definition or the example?
The definition is wrong; the example values are correct. (Based on the expected answer.)
Last edited by MHealy on Sat Nov 17, 2018 7:48 pm, edited 1 time in total.
Image

User avatar
hk
Administrator
Posts: 10202
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

Re: Problem 643

Post by hk » Sat Nov 17, 2018 7:47 pm

It should read $1\le p\lt q\le n$. Problem edited.
Image

vamsikal3
Posts: 63
Joined: Sat Oct 01, 2016 8:25 am

Re: Problem 643

Post by vamsikal3 » Sun Nov 18, 2018 9:35 am

There is a minor typo in the problem:

For example, 24 and 40 and 2-friendly because ....

The correct text is: For example, 24 and 40 are 2-friendly because ....
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image

User avatar
RobertStanforth
Administrator
Posts: 743
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 643

Post by RobertStanforth » Sun Nov 18, 2018 11:46 am

vamsikal3 wrote:
Sun Nov 18, 2018 9:35 am
The correct text is: For example, 24 and 40 are 2-friendly because ....
Thanks, Vamsi. This is fixed now.

Cot-O-Bus
Posts: 3
Joined: Thu Sep 27, 2018 9:18 am

Re: Problem 643

Post by Cot-O-Bus » Tue Nov 20, 2018 7:24 pm

Looks like expansion of PI-2, but...

HashFunction
Posts: 1
Joined: Mon Dec 31, 2018 3:01 pm

Re: Problem 643

Post by HashFunction » Mon Dec 31, 2018 3:08 pm

How come $$gcd(a,b)=2^t,t>0$$ , but with brute force I get f(100) = 1031 when t = 0 , that is $$gcd(a,b) = 2^0 = 1$$ , should t be >= 0 or am I wrong ?

User avatar
hk
Administrator
Posts: 10202
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

Re: Problem 643

Post by hk » Mon Dec 31, 2018 9:05 pm

Could it be that your bruteforcer is wrong?
Image

Post Reply