freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-204-generalised-ham...

65 lines
1.1 KiB
Markdown
Raw Normal View History

---
id: 5900f4381000cf542c50ff4b
challengeType: 5
title: 'Problem 204: Generalised Hamming Numbers'
forumTopicId: 301845
---
## Description
<section id='description'>
A Hamming number is a positive number which has no prime factor larger than 5.
So the first few Hamming numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15.
There are 1105 Hamming numbers not exceeding 108.
We will call a positive number a generalised Hamming number of type n, if it has no prime factor larger than n.
Hence the Hamming numbers are the generalised Hamming numbers of type 5.
How many generalised Hamming numbers of type 100 are there which don't exceed 109?
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler204()</code> should return 2944730.
testString: assert.strictEqual(euler204(), 2944730);
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler204() {
// Good luck!
return true;
}
euler204();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>