yaworsw/euler-manager

View on GitHub
data/problems/404.yml

Summary

Maintainability
Test Coverage
---
:id: 404
:name: Crisscross Ellipses
:url: https://projecteuler.net/problem=404
:content: "E<sub><var>a</var></sub> is an ellipse with an equation of the form x<sup>2</sup>
  + 4y<sup>2</sup> = 4<var>a</var><sup>2</sup>.  \nE<sub><var>a</var></sub>' is the
  rotated image of E<sub><var>a</var></sub> by θ degrees counterclockwise around the
  origin O(0, 0) for 0° \\< θ \\< 90°.\n\n ![p404_c_ellipse.gif]({{ images_dir }}/p404_c_ellipse.gif)\n\n<var>b</var>
  is the distance to the origin of the two intersection points closest to the origin
  and <var>c</var> is the distance of the two other intersection points.  \nWe call
  an ordered triplet (<var>a</var>, <var>b</var>, <var>c</var>) a _canonical ellipsoidal
  triplet_ if <var>a</var>, <var>b</var> and <var>c</var> are positive integers.  \nFor
  example, (209, 247, 286) is a canonical ellipsoidal triplet.\n\nLet C(<var>N</var>)
  be the number of distinct canonical ellipsoidal triplets (<var>a</var>, <var>b</var>,
  <var>c</var>) for <var>a</var> ≤ <var>N</var>.  \nIt can be verified that C(10<sup>3</sup>)
  = 7, C(10<sup>4</sup>) = 106 and C(10<sup>6</sup>) = 11845.\n\nFind C(10<sup>17</sup>).\n\n"