DefDbl A-Z
Dim crlf$
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For s0 = 1 To 99999
DoEvents
s = s0
For i = 1 To 54
s = (s * 5 + 4) Mod 2016
Next
If s = 0 Then
Text1.Text = Text1.Text & s0 & crlf
End If
Next
Text1.Text = Text1.Text & crlf & " done"
End Sub
finds
504
2520
4536
6552
8568
10584
12600
14616
16632
18648
20664
22680
24696
26712
28728
30744
32760
34776
36792
38808
40824
42840
44856
46872
48888
50904
52920
54936
56952
58968
60984
63000
65016
67032
69048
71064
73080
75096
77112
79128
81144
83160
85176
87192
89208
91224
93240
95256
97272
99288
so any 504 + 2016k works, where k=0, 1, ...
Starting with s(0)=504, s(54) and s(54)/2016 are respectively
28033131371785202645696699619293212890624
and
13905323101083929883778124811157347664.0
for the next possible value of s(0), 2520, these two numbers are
139943612254000981920398771762847900390624
and
69416474332341756904959708215698363289.0
based upon
5 open "inttrmil.txt" for output as #2
10 S=504
20 for I=1 to 54
30 S=S*5+4
40 next
50 print #2,S
60 print #2,S/2016
70 close #2
|
Posted by Charlie
on 2016-02-25 16:03:19 |