export function primes(num: number): number[] {
const numer: number[] = [];
for(let i=2; i<=num; i++){
if(Isprimes(i)){
numer.push(i);
}
}
return numer;
}
function Isprimes(num: number):boolean {
if(num ==1) return true;
if(num == 2 || num == 3) return true;
if( num % 2== 0 || num % 3 == 0) return false;
let i = 5;
while(num >= i*i){
if( num % i == 0 || num % (i+2) == 0 ) return false;
i +=6;
}
return true;
}
Thank you, friend!


I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit