n
emirp numbers.nth
emirp number.n
or the range as an array. The second will receive a boolean, that specifies if the function returns the emirps as an array or a single number (the number of primes in the range or the nth
prime). According to the parameters the function should return an array or a number.
emirps
should be a function.
testString: assert(typeof emirps === 'function');
- text: emirps(20,true)
should return [13,17,31,37,71,73,79,97,107,113,149,157,167,179,199,311,337,347,359,389]
testString: assert.deepEqual(emirps(20, true), [13, 17, 31, 37, 71, 73, 79, 97, 107, 113, 149, 157, 167, 179, 199, 311, 337, 347, 359, 389]);
- text: emirps(1000)
should return 70529
testString: assert.deepEqual(emirps(1000), 70529);
- text: emirps([7700,8000],true)
should return [7717,7757,7817,7841,7867,7879,7901,7927,7949,7951,7963]
testString: assert.deepEqual(emirps([7700, 8000], true), [7717, 7757, 7817, 7841, 7867, 7879, 7901, 7927, 7949, 7951, 7963]);
- text: emirps([7700,8000],true)
should return 11
testString: assert.deepEqual(emirps([7700, 8000], false), 11);
```