Timeline for Counting +1 primes
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 8, 2015 at 16:49 | history | edited | Downgoat | CC BY-SA 3.0 |
deleted 34 characters in body
|
Nov 7, 2015 at 19:33 | history | edited | Downgoat | CC BY-SA 3.0 |
added 8 characters in body
|
Nov 7, 2015 at 19:23 | history | edited | Downgoat | CC BY-SA 3.0 |
added 50 characters in body
|
Nov 7, 2015 at 19:22 | comment | added | Downgoat | @Naouak Awesome that saves 13 bytes! :) | |
Nov 7, 2015 at 19:19 | comment | added | Naouak |
I think you can shorten a bit checking prime like this: (p=(n,c)=>n%c!=0?c>=n-1?1:p(n,++c):0)('0b'+l,2) instead of !Array(+('0b'+l)+1).join(1).match(/^1?$|^(11+?)\1+$/)
|
|
Nov 7, 2015 at 3:26 | history | answered | Downgoat | CC BY-SA 3.0 |