Yellowstone sequence: Difference between revisions
→{{header|Go}}: Fixed bug though results unaffected.
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Include the actual terminal output too.) |
(→{{header|Go}}: Fixed bug though results unaffected.) |
||
Line 103:
m[i] = true
}
min :=
for c := 4; c <= n; c++ {
for i := min
if !m[i] && gcd(a[c-1], i) == 1 && gcd(a[c-2], i) > 1 {
a[c] = i
m[i] = true
if i
min
}
break
}
}
}
return a[1:]
}
|