Files
freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-273-sum-of-squares.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

811 B

id, title, challengeType, forumTopicId, dashedName
id title challengeType forumTopicId dashedName
5900f47e1000cf542c50ff90 Problem 273: Sum of Squares 5 301923 problem-273-sum-of-squares

--description--

Consider equations of the form: a2 + b2 = N, 0 ≤ a ≤ b, a, b and N integer.

For N=65 there are two solutions: a=1, b=8 and a=4, b=7. We call S(N) the sum of the values of a of all solutions of a2 + b2 = N, 0 ≤ a ≤ b, a, b and N integer. Thus S(65) = 1 + 4 = 5. Find ∑S(N), for all squarefree N only divisible by primes of the form 4k+1 with 4k+1 < 150.

--hints--

euler273() should return 2032447591196869000.

assert.strictEqual(euler273(), 2032447591196869000);

--seed--

--seed-contents--

function euler273() {

  return true;
}

euler273();

--solutions--

// solution required