Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
i:= 42, n:= 1, result := ""
|
||||
while (n<43){
|
||||
if isPrime(i)
|
||||
result .= n ":`t" RegExReplace(i, "\B(?=(\d{3})+$)", ",") "`n", i*=2, n++
|
||||
else
|
||||
i++
|
||||
}
|
||||
MsgBox, 262208, , % result
|
||||
return
|
||||
|
||||
isPrime(num){
|
||||
if !Mod(num, 2) || !Mod(num, 3)
|
||||
return false
|
||||
lim := Sqrt(num), i := 5
|
||||
while (i<lim){
|
||||
if !Mod(num, i)
|
||||
return false
|
||||
i+=2
|
||||
}
|
||||
return true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue