--- title: Amicable pairs id: 5949b579404977fbaefcd737 challengeType: 5 videoUrl: '' localeTitle: Parejas amistosas --- ## Description
Se dice que dos enteros $ N $ y $ M $ son pares amigables si $ N \ neq M $ y la suma de los divisores apropiados de $ N $ ($ \ mathrm {suma} (\ mathrm {propDivs} (N)) $) $ = M $, así como $ \ mathrm {suma} (\ mathrm {propDivs} (M)) = N $. Ejemplo: 1184 y 1210 son una pareja amigable, con divisores apropiados: 1, 2, 4, 8, 16, 32, 37, 74, 148, 296, 592 y 1, 2, 5, 10, 11, 22, 55, 110, 121, 242, 605 respectivamente. Tarea: Calcula y muestra aquí los pares de amigos por debajo de 20,000 (hay ocho). Tareas relacionadas Divisores apropiados Clasificaciones numéricas abundantes, deficientes y perfectas Clasificaciones de secuencias alícuotas y su clasificación amistosa.
## Instructions
## Tests
```yml tests: - text: amicablePairsUpTo es una función. testString: 'assert(typeof amicablePairsUpTo === "function", "amicablePairsUpTo is a function.");' - text: 'amicablePairsUpTo(300) debe devolver [[220,284]] .' testString: 'assert.deepEqual(amicablePairsUpTo(300), answer300, "amicablePairsUpTo(300) should return [[220,284]].");' - text: 'amicablePairsUpTo(3000) debe devolver [[220,284],[1184,1210],[2620,2924]] .' testString: 'assert.deepEqual(amicablePairsUpTo(3000), answer3000, "amicablePairsUpTo(3000) should return [[220,284],[1184,1210],[2620,2924]].");' - text: 'amicablePairsUpTo(20000) debe devolver [[220,284],[1184,1210],[2620,2924],[5020,5564],[6232,6368],[10744,10856],[12285,14595],[17296,18416]] .' testString: 'assert.deepEqual(amicablePairsUpTo(20000), answer20000, "amicablePairsUpTo(20000) should return [[220,284],[1184,1210],[2620,2924],[5020,5564],[6232,6368],[10744,10856],[12285,14595],[17296,18416]].");' ```
## Challenge Seed
```js function amicablePairsUpTo (maxNum) { // Good luck! return true; } ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```