Problem 591

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
markusmeister
Posts: 1
Joined: Thu Mar 09, 2017 7:31 pm

Problem 591

Post by markusmeister »

Looking for clarification on the wording of problem 591:
1. "We call BQAd(x,n) the quadratic integer closest to x with the absolute values of a,b not exceeding n." d does not appear in the definition. Is the intended text "We call BQAd(x,n) the quadratic integer of the form a+b*sqrt(d) closest to x with the absolute values of a,b not exceeding n"?
2. "Find the sum of |Id(BQAd(π,10^13))| for all non-square positive integers less than 100." Again d is not defined. Is the intended text "Find the sum of |Id(BQAd(π,10^13))| where d runs through all non-square positive integers less than 100"?
MHealy
Posts: 40
Joined: Sat Nov 17, 2012 11:32 pm

Re: Problem 591

Post by MHealy »

Yes, you have the correct interpretation in both cases.
Image
gh314
Posts: 1
Joined: Wed Apr 09, 2014 12:38 am

Re: Problem 591

Post by gh314 »

My program is correct for all the test cases. I think the problem is that I can't actually verify that the pair I have for √3 is actually the best below 10^13. Does anyone have some more test cases I can run? In the meantime I'll make my own test cases by comparing brute force to my program.

Edit: Solved. I did what I said I would and discovered some inconsistencies in calculated vs brute force with L = 10^6.
Post Reply