Problem 175

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
ffff0
Posts: 50
Joined: Sun Aug 21, 2011 6:26 am
Location: Moscow, Russian Federation

Problem 175

Post by ffff0 »

Hi everyone.

While solving #175, I've found (x,96021946,x). I'm sure that this number is good, but it's not the answer. So there must be a smaller one.

Can anyone tell me how far from the truth I am? And, if possible, please tell me a number of 1s and 0s groups in the answer.
Image
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 175

Post by hk »

I crossed out all correct digits. :)
Image
War ruins the life and health of untold numbers of innocent children.
ffff0
Posts: 50
Joined: Sun Aug 21, 2011 6:26 am
Location: Moscow, Russian Federation

Re: Problem 175

Post by ffff0 »

Thanks. At least I'm on a right track.
Image
User avatar
rmacheshire
Posts: 5
Joined: Wed Nov 04, 2015 6:26 pm
Location: Portugal

Re: Problem 175

Post by rmacheshire »

While investigating problem 175 I calculated that f(242)=13 and f(241) = 17, using the function developed for problem 169. However the problem statement for 175 states that f(241) = 13 and f(240) =17. Which of us is right?
DJohn
Posts: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: Problem 175

Post by DJohn »

rmacheshire wrote: Tue Jan 22, 2019 1:31 pm While investigating problem 175 I calculated that f(242)=13 and f(241) = 17, using the function developed for problem 169. However the problem statement for 175 states that f(241) = 13 and f(240) =17. Which of us is right?
The problem statement is correct. It's possible that your implementation for problem 169 is wrong in general but happens to get the right result for that particular value.
charre
Posts: 3
Joined: Fri Nov 23, 2018 3:16 pm

Re: Problem 175

Post by charre »

I use the decomposition in continued fractions of 13/17 which gives me directly Shortened Binary Expansion of n and by checking with the function of stern (or fusc of pb 169) I check my result which is correct; I applied to the requested fraction but the Shortened Binary Expansion found is not correct while I reconstitute the initial fraction well !!
is the input of the result correct with "," as a separator?
thanks for an answer
charre
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 175

Post by hk »

Yes, the problem as given is solved by 1859 users so far.
Image
War ruins the life and health of untold numbers of innocent children.
charre
Posts: 3
Joined: Fri Nov 23, 2018 3:16 pm

Re: Problem 175

Post by charre »

Good morning
the statement of pb 175 asks for the smallest n such that f(n)/f(n-1)=a/b but we know mathematically that this n is unique because there is a bijection between the integers
positive and positive rational numbers using f(n)/f(n+1) provided that the fraction a/b is irreducible (which the proposed fraction is not) so I don't understand not the formulation of the statement "smallest n" !!
thanks for enlightening me
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 175

Post by jaap »

charre wrote: Thu Jul 27, 2023 10:37 am Good morning
the statement of pb 175 asks for the smallest n such that f(n)/f(n-1)=a/b but we know mathematically that this n is unique because there is a bijection between the integers
positive and positive rational numbers using f(n)/f(n+1) provided that the fraction a/b is irreducible (which the proposed fraction is not) so I don't understand not the formulation of the statement "smallest n" !!
thanks for enlightening me
This has nothing to do with bijections. Consider the example mentioned in the problem.
For instance, the smallest $n$ for which $f(n)/f(n-1)=13/17$ is $241$
$n$ must be a positive integer. For each of the values $n=1$, $n=2$, ..., $n=240$, if you calculate $f(n)/f(n-1)$ you get some rational number that is not equal to $13/17$, but if you calculate it for $n=241$ you find that $f(241)/f(240)=13/17$.
So $241$ is the smallest $n$ for which $f(n)/f(n-1)=13/17$. There is no smaller integer that works.
Post Reply