Skip to content

Finds the first consecutive number in the consecutive numbers to have a certain number of distinct prime factors each. For example, 14 is the first consecutive number of two consecutive numbers (14 and 15) to have two distinct prime factors.

Notifications You must be signed in to change notification settings

derektypist/project-euler-047

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Euler 047 - Distinct Primes Factors

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

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

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

  • 644 = 22 x 7 x 3
  • 645 = 3 x 5 x 43
  • 646 = 2 x 17 x 19

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

Information at Project Euler 047

UX

Getting Started

Select Show Solution to show the solutions. Or Hide Solution to hide the solutions.

User Stories

As a user, I can show or hide the solution by selecting the appropriate button.

As a user, I expect the function distinctPrimesFactors(2,2) to return a number.

As a user, I expect the function distinctPrimesFactors(2,2) to return 14.

As a user, I expect the function distinctPrimesFactors(3,3) to return 644.

As a user, I expect the function distinctPrimesFactors(4,4) to return 134043.

User Stories on function distinctPrimesFactors(targetNumPrimes,targetConsecutive) taken from FreeCodeCamp - Coding Interview Prep - Project Euler 047

Information Architecture

The function distinctPrimesFactors(targetNumPrimes,targetConsecutive) returns a number. The parameters targetNumPrimes and targetConsecutive are both numbers.

targetNumPrimes ranges from 2 to 4 and targetConsecutive ranges from 2 to 4.

Features

Allows the user to show or hide the solutions to the problem as described in Project Euler 047

Technologies

Uses HTML5, CSS3, JavaScript, Bootstrap 5.2.2 and Google Fonts.

Testing

Ensure all user stories have been met.

Deployment

Deployed on GitHub Pages at the main branch.

Credits

Content

Written by me.

Acknowledgements

About

Finds the first consecutive number in the consecutive numbers to have a certain number of distinct prime factors each. For example, 14 is the first consecutive number of two consecutive numbers (14 and 15) to have two distinct prime factors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published