Back to Freecodecamp

Problem 233: Lattice points on a circle

curriculum/challenges/english/blocks/project-euler-problems-201-to-300/5900f4551000cf542c50ff68.md

latest606 B
Original Source

--description--

Let $f(N)$ be the number of points with integer coordinates that are on a circle passing through $(0,0)$, $(N,0)$,$(0,N)$, and $(N,N)$.

It can be shown that $f(10000) = 36$.

What is the sum of all positive integers $N ≤ {10}^{11}$ such that $f(N) = 420$?

--hints--

latticePointsOnACircle() should return 271204031455541300.

js
assert.strictEqual(latticePointsOnACircle(), 271204031455541300);

--seed--

--seed-contents--

js
function latticePointsOnACircle() {

  return true;
}

latticePointsOnACircle();

--solutions--

js
// solution required