freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-421-prime-factors-o...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f5131000cf542c510024 5 Problem 421: Prime factors of n15+1 Problema 421: Fatores primos de n15 + 1

Description

Os números da forma n15 + 1 são compostos para cada inteiro n> 1. Para inteiros positivos n e m let s (n, m) ser definido como a soma dos fatores primos distintos de n15 + 1 não excedendo m.

Por exemplo, 215 + 1 = 3 × 3 × 11 × 331. So s (2,10) = 3 e s (2,1000) = 3 + 11 + 331 = 345.

Também 1015 + 1 = 7 × 11 × 13 × 211 × 241 × 2161 × 9091. So s (10,100) = 31 e s (10,1000) = 483. Encontre s (n, 108) para 1 n n 1011.

Instructions

Tests

tests:
  - text: <code>euler421()</code> deve retornar 2304215802083466200.
    testString: 'assert.strictEqual(euler421(), 2304215802083466200, "<code>euler421()</code> should return 2304215802083466200.");'

Challenge Seed

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

euler421();

Solution

// solution required