## 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

Don't post any spoilers
vapor
Posts: 2
Joined: Sun Dec 31, 2017 3:02 pm

### Problem 643

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.

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

### Re: Problem 643

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?

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

### Re: Problem 643

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.

hk
Posts: 10422
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

### Re: Problem 643

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

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

### Re: Problem 643

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

RobertStanforth
Posts: 981
Joined: Mon Dec 30, 2013 11:25 pm

### Re: Problem 643

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: 6
Joined: Thu Sep 27, 2018 9:18 am

### Re: Problem 643

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

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

### Re: Problem 643

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 ?

hk