← Complete problem index

PROJECT EULER · #0591

Best Approximations by Quadratic Integers

Statement only · UnsolvedOriginal problem ↗

Given a non-square integer d, any real x can be approximated arbitrarily close by quadratic integers a+bd, where a,b are integers. For example, the following inequalities approximate π with precision 1013:
437563619152026188084046055<π<72113331558221019836515172
We call BQAd(x,n) the quadratic integer closest to x with the absolute values of a,b not exceeding n.
We also define the integral part of a quadratic integer as Id(a+bd)=a.

You are given that:

  • BQA2(π,10)=622
  • BQA5(π,100)=26555
  • BQA7(π,106)=5603232117817
  • I2(BQA2(π,1013))=6188084046055

Find the sum of |Id(BQAd(π,1013))| for all non-square positive integers less than 100.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.