2018-09-30 23:01:58 +01:00
---
id: 5900f4ef1000cf542c510001
title: 'Problem 386: Maximum length of an antichain'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 302050
2021-01-13 03:31:00 +01:00
dashedName: problem-386-maximum-length-of-an-antichain
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-30 16:59:29 +02:00
Let $n$ be an integer and $S(n)$ be the set of factors of $n$.
2018-09-30 23:01:58 +01:00
2021-07-30 16:59:29 +02:00
A subset $A$ of $S(n)$ is called an antichain of $S(n)$ if $A$ contains only one element or if none of the elements of $A$ divides any of the other elements of $A$.
2018-09-30 23:01:58 +01:00
2021-07-30 16:59:29 +02:00
For example: $S(30) = \\{1, 2, 3, 5, 6, 10, 15, 30\\}$
2018-09-30 23:01:58 +01:00
2021-07-30 16:59:29 +02:00
$\\{2, 5, 6\\}$ is not an antichain of $S(30)$.
2018-09-30 23:01:58 +01:00
2021-07-30 16:59:29 +02:00
$\\{2, 3, 5\\}$ is an antichain of $S(30)$.
Let $N(n)$ be the maximum length of an antichain of $S(n)$.
Find $\sum N(n)$ for $1 ≤ n ≤ {10}^8$
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-30 16:59:29 +02:00
`maximumLengthOfAntichain()` should return `528755790` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-30 16:59:29 +02:00
assert.strictEqual(maximumLengthOfAntichain(), 528755790);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-30 16:59:29 +02:00
function maximumLengthOfAntichain() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-30 16:59:29 +02:00
maximumLengthOfAntichain();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```