2018-10-10 18:03:03 -04:00
---
id: 5900f5111000cf542c510023
2021-02-06 04:42:36 +00:00
title: 'Problem 420: 2x2 positive integer matrix'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 302090
2021-01-13 03:31:00 +01:00
dashedName: problem-420-2x2-positive-integer-matrix
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
A positive integer matrix is a matrix whose elements are all positive integers.
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
Some positive integer matrices can be expressed as a square of a positive integer matrix in two different ways. Here is an example:
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
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.
2020-02-18 01:40:55 +09:00
2021-02-06 04:42:36 +00:00
Find F(107).
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
`euler420()` should return 145159332.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert.strictEqual(euler420(), 145159332);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function euler420() {
return true;
}
euler420();
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-08-13 17:24:35 +02:00
2021-01-13 03:31:00 +01:00
```js
// solution required
```