yaworsw/euler-manager

View on GitHub
data/problems/229.yml

Summary

Maintainability
Test Coverage
---
:id: 229
:name: Four Representations using Squares
:url: https://projecteuler.net/problem=229
:content: "Consider the number 3600. It is very special, because\n\n3600 = 48<sup>2</sup>
  + &nbsp;&nbsp; &nbsp;36<sup>2</sup>  \n  \n3600 = 20<sup>2</sup> + 2×40<sup>2</sup>
  \ \n  \n3600 = 30<sup>2</sup> + 3×30<sup>2</sup>  \n  \n3600 = 45<sup>2</sup> +
  7×15<sup>2</sup>  \n  \n\nSimilarly, we find that 88201 = 99<sup>2</sup> + 280<sup>2</sup>
  = 287<sup>2</sup> + 2×54<sup>2</sup> = 283<sup>2</sup> + 3×52<sup>2</sup> = 197<sup>2</sup>
  + 7×84<sup>2</sup>.\n\nIn 1747, Euler proved which numbers are representable as
  a sum of two squares. We are interested in the numbers <var>n</var> which admit
  representations of all of the following four types:\n\n<var>n</var> = <var>a<sub>1</sub></var><sup>2</sup>
  + &nbsp; <var>b<sub>1</sub></var><sup>2</sup>  \n  \n<var>n</var> = <var>a<sub>2</sub></var><sup>2</sup>
  + 2 <var>b<sub>2</sub></var><sup>2</sup>  \n  \n<var>n</var> = <var>a<sub>3</sub></var><sup>2</sup>
  + 3 <var>b<sub>3</sub></var><sup>2</sup>  \n  \n<var>n</var> = <var>a<sub>7</sub></var><sup>2</sup>
  + 7 <var>b<sub>7</sub></var><sup>2</sup>,\n\nwhere the <var>a</var><sub><var>k</var></sub>
  and <var>b</var><sub><var>k</var></sub> are positive integers.\n\nThere are 75373
  such numbers that do not exceed 10<sup>7</sup>.  \nHow many such numbers are there
  that do not exceed 2×10<sup>9</sup>?\n\n"