freeCodeCamp/curriculum/challenges/english/10-coding-interview-prep/project-euler/problem-420-2x2-positive-integer-matrix.english.md
mrugesh 22afc2a0ca feat(learn): python certification projects (#38216)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Beau Carnes <beaucarnes@gmail.com>
2020-05-27 13:19:08 +05:30

1.1 KiB

id, challengeType, isHidden, title, forumTopicId
id challengeType isHidden title forumTopicId
5900f5111000cf542c510023 5 false Problem 420: 2x2 positive integer matrix 302090

Description

A positive integer matrix is a matrix whose elements are all positive integers. Some positive integer matrices can be expressed as a square of a positive integer matrix in two different ways. Here is an example:

We define F(N) as the number of the 2x2 positive integer matrices which have a trace less than N and which can be expressed as a square of a positive integer matrix in two different ways. We can verify that F(50) = 7 and F(1000) = 1019.

Find F(107).

Instructions

Tests

tests:
  - text: <code>euler420()</code> should return 145159332.
    testString: assert.strictEqual(euler420(), 145159332);

Challenge Seed

function euler420() {
  // Good luck!
  return true;
}

euler420();

Solution

// solution required