2018-09-30 22:01:58 +00:00
---
id: 5900f5111000cf542c510023
title: 'Problem 420: 2x2 positive integer matrix'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 302090
2021-01-13 02:31:00 +00:00
dashedName: problem-420-2x2-positive-integer-matrix
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
A positive integer matrix is a matrix whose elements are all positive integers.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +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:
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +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.
2018-09-30 22:01:58 +00:00
Find F(107).
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
`euler420()` should return 145159332.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
assert.strictEqual(euler420(), 145159332);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
function euler420() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
euler420();
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```