Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Lucas-Lehmer-test/VBScript/lucas-lehmer-test.vb
Normal file
18
Task/Lucas-Lehmer-test/VBScript/lucas-lehmer-test.vb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
iexpmax = 15
|
||||
n=1
|
||||
out=""
|
||||
For iexp = 2 To iexpmax
|
||||
If iexp = 2 Then
|
||||
s = 0
|
||||
Else
|
||||
s = 4
|
||||
End If
|
||||
n = (n + 1) * 2 - 1
|
||||
For i = 1 To iexp - 2
|
||||
s = (s * s - 2) Mod n
|
||||
Next
|
||||
If s = 0 Then
|
||||
out=out & "M" & iexp & " "
|
||||
End If
|
||||
Next
|
||||
Wscript.echo out
|
||||
Loading…
Add table
Add a link
Reference in a new issue