EKG sequence convergence: Difference between revisions
→{{header|Go}}: Extended to generate EKG(9) and EKG(10) and the first 30 terms for all 5 cases.
m (→{{header|zkl}}: added ekg(10)) |
(→{{header|Go}}: Extended to generate EKG(9) and EKG(10) and the first 30 terms for all 5 cases.) |
||
Line 160:
func main() {
const limit = 100
starts := [
var ekg [
for s, start := range starts {
Line 176:
}
}
fmt.Printf("EKG(%
}
// now compare EKG5 and EKG7 for convergence
Line 191:
{{out}}
<pre>
EKG( 2): [1 2 4 6 3 9 12 8 10 5 15 18 14 7 21 24 16 20 22 11 33 27 30 25 35 28 26 13 39 36]
EKG( 5): [1 5 10 2 4 6 3 9 12 8 14 7 21 15 18 16 20 22 11 33 24 26 13 39 27 30 25 35 28 32]
EKG( 7): [1 7 14 2 4 6 3 9 12 8 10 5 15 18 16 20 22 11 33 21 24 26 13 39 27 30 25 35 28 32]
EKG( 9): [1 9 3 6 2 4 8 10 5 15 12 14 7 21 18 16 20 22 11 33 24 26 13 39 27 30 25 35 28 32]
EKG(10): [1 10 2 4 6 3 9 12 8 14 7 21 15 5 20 16 18 22 11 33 24 26 13 39 27 30 25 35 28 32]
EKG(5) and EKG(7) converge at term 21
|