Skip to main content
edited tags
Link
Toby Speight
  • 88.3k
  • 14
  • 104
  • 327

The first two consecutive numbers to have two distinct prime factors are:

14 = 2 × 7 15 = 3 × 5

  • 14 = 2 × 7
  • 15 = 3 × 5

The first three consecutive numbers to have three distinct prime factors are:

644 = 22 × 7 × 23 645 = 3 × 5 × 43 646 = 2 × 17 × 19.

  • 644 = 22 × 7 × 23
  • 645 = 3 × 5 × 43
  • 646 = 2 × 17 × 19.

Find the first four consecutive integers to have four distinct prime factors each. What is the first of these numbers?

The first two consecutive numbers to have two distinct prime factors are:

14 = 2 × 7 15 = 3 × 5

The first three consecutive numbers to have three distinct prime factors are:

644 = 22 × 7 × 23 645 = 3 × 5 × 43 646 = 2 × 17 × 19.

Find the first four consecutive integers to have four distinct prime factors each. What is the first of these numbers?

The first two consecutive numbers to have two distinct prime factors are:

  • 14 = 2 × 7
  • 15 = 3 × 5

The first three consecutive numbers to have three distinct prime factors are:

  • 644 = 22 × 7 × 23
  • 645 = 3 × 5 × 43
  • 646 = 2 × 17 × 19.

Find the first four consecutive integers to have four distinct prime factors each. What is the first of these numbers?

added 9 characters in body
Source Link
Der Kommissar
  • 20.3k
  • 4
  • 70
  • 158

The correct answer is 134043.:

134043.

I used some sort of memoization to work out the problem but the performance is still pretty bad: 5.4–5.5 seconds. The trick in this question here is that the prime factors can actually be on some power which if evaluated doesn't result in a prime number but if the base is prime it's fine: e.g., 22 = 4.

The correct answer is 134043. I used some sort of memoization to work out the problem but the performance is still pretty bad: 5.4–5.5 seconds. The trick in this question here is that the prime factors can actually be on some power which if evaluated doesn't result in a prime number but if the base is prime it's fine: e.g., 22 = 4.

The correct answer is :

134043.

I used some sort of memoization to work out the problem but the performance is still pretty bad: 5.4–5.5 seconds. The trick in this question here is that the prime factors can actually be on some power which if evaluated doesn't result in a prime number but if the base is prime it's fine: e.g., 22 = 4.

Improve title, fix grammar, and optimized tag selection. This is a C# language question, with very little to do with the .NET Framework.
Link
Denis
  • 8.6k
  • 5
  • 33
  • 76
Loading
Improve title, fix grammar, and optimized tag selection. This is a C# language question, with very little to do with the .NET Framework.
Source Link
Loading
deleted 47 characters in body
Source Link
Denis
  • 8.6k
  • 5
  • 33
  • 76
Loading
added 41 characters in body
Source Link
Denis
  • 8.6k
  • 5
  • 33
  • 76
Loading
Source Link
Denis
  • 8.6k
  • 5
  • 33
  • 76
Loading